-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-prod.yaml
83 lines (76 loc) · 1.41 KB
/
docker-compose-prod.yaml
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
81
82
83
version: "3.6"
services:
wannadb:
build:
context: .
dockerfile: Dockerfile
target: prod
restart: always
tty: true
ports:
- "8000:8000"
env_file:
- wannadb_web/.env/.dev
depends_on:
- postgres
- redis
networks:
- mynetwork
worker:
build:
context: .
dockerfile: Dockerfile
target: worker
tty: true
command: ["celery", "-A", "celery_app", "worker", "-l", "info"]
env_file:
- wannadb_web/.env/.dev
volumes:
- ./:/home/wannadb
networks:
- mynetwork
depends_on:
- wannadb
- redis
flower:
build:
context: .
dockerfile: Dockerfile
target: worker
tty: true
command: ['celery', '-A', 'celery_app', 'flower']
env_file:
- wannadb_web/.env/.dev
volumes:
- ./:/home/wannadb
networks:
- mynetwork
ports:
- "5555:5555"
depends_on:
- wannadb
- redis
postgres:
image: postgres
container_name: postgres-container
environment:
POSTGRES_PASSWORD: 0
POSTGRES_DB: userManagement
networks:
- mynetwork
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:alpine
container_name: redis-container
ports:
- "6379:6379"
networks:
- mynetwork
networks:
mynetwork:
driver: bridge
volumes:
pgdata: