-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
53 lines (48 loc) · 1.35 KB
/
docker-compose.dev.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
x-app: &default-app
image: example_project_dev:latest
volumes:
- .:/app
- vscode-server:/root/.vscode-server/extensions
- vscode-server-insiders:/root/.vscode-server-insiders/extensions
environment:
DJANGO_INTERNAL_IPS: ${DJANGO_INTERNAL_IPS:?}
DJANGO_SETTINGS_MODULE: "example_project.settings.development"
FORCE_DEBUG_TOOLBAR: ${FORCE_DEBUG_TOOLBAR:-true}
REMOTE_DEBUGGING_ENABLED: ${REMOTE_DEBUGGING_ENABLED:-false}
REMOTE_DEBUGGING_PORT: ${REMOTE_DEBUGGING_PORT:-5678}
pull_policy: never
services:
init:
profiles:
- never
web:
<<: *default-app
build:
target: development
ports:
- "${WEB_DEV_PORT:-8000}:8000"
- "${REMOTE_DEBUGGING_PORT:-5678}:5678"
command: >
bash -c "
cd example_project;
wait-for-it -s postgres.local:5432 -t 60 &&
./manage.py migrate &&
./manage.py create_superuser &&
./manage.py create_example_users &&
./manage.py create_example_groups &&
./manage.py runserver 0.0.0.0:8000
"
worker:
<<: *default-app
command: >
bash -c "
cd example_project;
wait-for-it -s postgres.local:5432 -t 60 &&
./manage.py bg_worker -l debug --autoreload
"
postgres:
environment:
POSTGRES_PASSWORD: postgres
volumes:
vscode-server:
vscode-server-insiders: