-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 1.87 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "3.6"
x-environment: &py-environment
DEBUG: "False"
DEV_ENV: "True" # necessary to have nginx connect to web container
NODE_ENV: "production"
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
BOOTCAMP_SECURE_SSL_REDIRECT: "False"
BOOTCAMP_DB_DISABLE_SSL: "True"
CELERY_TASK_ALWAYS_EAGER: "False"
CELERY_BROKER_URL: redis://redis:6379/4
CELERY_RESULT_BACKEND: redis://redis:6379/4
DOCKER_HOST: ${DOCKER_HOST:-missing}
WEBPACK_DEV_SERVER_HOST: ${WEBPACK_DEV_SERVER_HOST:-localhost}
WEBPACK_DEV_SERVER_PORT: ${WEBPACK_DEV_SERVER_PORT:-8098}
services:
db:
image: postgres:13.15
environment:
POSTGRES_PASSWORD: postgres # pragma: allowlist secret
ports:
- "5432"
redis:
image: redis:6.2.14
ports:
- "6379"
nginx:
image: nginx:1.27.0
ports:
- "8099:8099"
links:
- web
web:
build:
context: .
dockerfile: Dockerfile
command: >
/bin/bash -c '
sleep 3 &&
python3 manage.py collectstatic --noinput &&
python3 manage.py migrate --no-input &&
uwsgi uwsgi.ini --honour-stdin'
stdin_open: true
tty: true
ports:
- "8097:8097"
environment:
<<: *py-environment
PORT: 8097
env_file: .env
links:
- db
- redis
watch:
build:
context: .
dockerfile: Dockerfile-node
working_dir: /src
command: >
/bin/bash -c './webpack_dev_server.sh --install'
ports:
- "8098:8098"
environment:
NODE_ENV: "production"
DOCKER_HOST: ${DOCKER_HOST:-missing}
CONTAINER_NAME: "watch"
env_file: .env
celery:
build:
context: .
dockerfile: Dockerfile
environment: *py-environment
env_file: .env
command: >
/bin/bash -c '
sleep 3;
celery -A main worker -B -l ${BOOTCAMP_LOG_LEVEL:-INFO}'
links:
- db
- redis