-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (69 loc) · 1.48 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
version: '3'
services:
app:
container_name: "url_app"
env_file:
- /data/url-shortner/env/app.env
build:
context: .
dockerfile: Dockerfile
environment:
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
ports:
- "5000:5000"
db:
container_name: "url_db"
restart: always
env_file:
- /data/url-shortner/env/postgres.env
expose:
- 5432
image: postgres
volumes:
- /data/url-shortner/volumes/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
networks:
url_net:
ipv4_address: 10.0.0.6
redis:
image: redis:5.0.4
privileged: true
restart: always
container_name: "url_redis"
volumes:
- /data/url-shortner/volumes/redis:/data
networks:
url_net:
ipv4_address: 10.0.0.5
rabbit:
image: rabbitmq:3-management
container_name: "url_rabbit"
restart: always
expose:
- 5672
- 15672
env_file:
- /data/url-shortner/env/app.env
volumes:
- /data/pandora/volumes/rabbit:/var/lib/rabbitmq
networks:
url_net:
ipv4_address: 10.0.0.4
worker:
container_name: "url_worker"
env_file:
- /data/url-shortner/env/app.env
build:
context: .
dockerfile: Dockerfile
command: celery -A app.tasks:celery worker -c=10 -n url@%h -l info
networks:
- url_net
networks:
url_net:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/24