-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (73 loc) · 1.71 KB
/
docker-compose.yml
File metadata and controls
80 lines (73 loc) · 1.71 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
76
77
78
79
80
version: '3.9'
services:
some-rabbit:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
environment:
- RABBITMQ_DEFAULT_VHOST=vhost
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
db:
image: postgres:13.0-alpine
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
app:
depends_on:
- db
- some-rabbit
build: ./file_handler
ports:
- 8000:8000
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
volumes:
- static_value:/app/static/
- media_value:/app/media/
environment:
- D=0
- ENGINE=django.db.backends.postgresql
- NAME=postgres
- USER=postgres
- PASSWORD=postgres
- HOST=db
- PORT=5432
- BROKER_URL=amqp://user:password@some-rabbit:5672/vhost
restart: always
celery:
depends_on:
- db
- some-rabbit
build: ./file_handler
command: bash -c "celery -A file_handler worker -l INFO"
volumes:
- static_value:/app/static/
- media_value:/app/media/
environment:
- D=0
- ENGINE=django.db.backends.postgresql
- NAME=postgres
- USER=postgres
- PASSWORD=postgres
- HOST=db
- PORT=5432
- BROKER_URL=amqp://user:password@some-rabbit:5672/vhost
restart: always
nginx:
image: nginx:1.25.1-alpine
ports:
- "80:80"
volumes:
- ./file_handler/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
volumes:
postgres_data:
static_value:
media_value: