-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
78 lines (72 loc) · 1.91 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
version: '2'
services:
nginx:
restart: unless-stopped
container_name: demo_nginx
build:
context: .
dockerfile: ./Dockerfile.nginx
ports:
- 80:80
volumes:
- static_volume:/app/backend/server/django_static
- media_volume:/app/backend/server/media
- ./nginx/production:/etc/nginx/conf.d
depends_on:
- django
socket:
restart: unless-stopped
container_name: demo_socket
build:
context: .
dockerfile: Dockerfile.socket
depends_on:
- rmq
env_file:
- ./.env
django:
restart: unless-stopped
container_name: demo_django
build:
context: .
dockerfile: Dockerfile.django
volumes:
- static_volume:/usr/src/app/django_static
- media_volume:/usr/src/app/media
expose:
- 8000
depends_on:
- postgres
- rmq
env_file:
- ./.env
rmq:
image: rabbitmq:3.10-management
restart: always
container_name: demo_rmq
environment:
- RABBITMQ_DEFAULT_USER=${RMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RMQ_PASS}
volumes:
- rabbitmq_data_volume:/var/lib/rabbitmq/
ports:
- 1234:15672
- 5671-5672:5671-5672
env_file:
- ./.env
postgres:
image: postgres:15-alpine
container_name: demo_postgres
volumes:
- postgres_volume:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- ./.env
volumes:
static_volume: {}
media_volume: {}
postgres_volume: {}
rabbitmq_data_volume: {}