-
Notifications
You must be signed in to change notification settings - Fork 107
/
docker-compose.yml
48 lines (45 loc) · 1.31 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3.5"
services:
web:
build:
context: .
dockerfile: Dockerfile
target: prod
container_name: pycontw-2024
hostname: pycontw-2024
entrypoint: ""
command:
# Hacky script for quick demonstration purpose
- bash
- -c
- |
set -o errexit -o nounset -o pipefail
python3 manage.py compilemessages
python3 manage.py migrate
python3 manage.py collectstatic --no-input
exec uwsgi --http-socket :8000 \
--master \
--hook-master-start "unix_signal:15 gracefully_kill_them_all" \
--static-map /static=assets \
--static-map /media=media \
--mount /prs=pycontw2016/wsgi.py \
--manage-script-name \
--offload-threads 2
restart: always
environment:
# Save us from having to type `--setting=pycontw2016.settings.production`
DJANGO_SETTINGS_MODULE: pycontw2016.settings.production.pycontw2024
SCRIPT_NAME: /prs
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: ${DATABASE_URL}
EMAIL_URL: ${EMAIL_URL}
GTM_TRACK_ID: ${GTM_TRACK_ID}
SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL}
volumes:
- ${MEDIA_ROOT}:/usr/local/app/src/media
networks:
- network-2024
networks:
network-2024:
external: true
name: network-2024