-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (70 loc) · 1.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (70 loc) · 1.58 KB
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
version: "3.7"
services:
web:
build:
context: ./
dockerfile: Dockerfile.local
command: python -m debugpy --listen 0.0.0.0:5678 manage.py runserver 0.0.0.0:8001
working_dir: /app
volumes:
- ./app:/app
ports:
- 5678:5678 # debugger
- 8001:8001 # mapped to 8001 to prevent clashes with local django instances
- 8890:8888 # allows use of django shell notebooks during local development
env_file:
- ./.env
environment:
- DB_NAME=admg_webapp
- DB_HOST=db
- DB_PORT=5432
- DB_USER=user
- DB_PASSWORD=password
- MIGRATE=true
depends_on:
- db
- rabbitmq
db:
image: postgis/postgis:12-3.3
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=admg_webapp
ports:
- "5439:5432"
rabbitmq:
container_name: rabbitmq
hostname: rabbitmq
image: rabbitmq:latest
ports:
- "5673:5672"
restart: on-failure
celery_worker:
build:
context: ./
dockerfile: Dockerfile.local
command: celery -A config worker -l info
working_dir: /app
container_name: celery_worker
hostname: celery_worker
volumes:
- ./app:/app
restart: on-failure
env_file:
- ./.env
environment:
- DB_NAME=admg_webapp
- DB_HOST=db
- DB_PORT=5432
- DB_USER=user
- DB_PASSWORD=password
- MIGRATE=false
depends_on:
- web
- rabbitmq
volumes:
postgres_data:
static_volume:
media_volume: