-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdocker-compose.yml
112 lines (110 loc) · 2.38 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: "3.9"
services:
flower:
build:
context: .
dockerfile: docker/celery-flower/Dockerfile
environment:
DATABASE_NAME: hitman_db
DATABASE_USER: hitman
DATABASE_PASSWORD: hitman
DATABASE_HOST: postgres
DATABASE_PORT: 5432
REDIS_URL: redis://redis:6379/0
depends_on:
- postgres
- redis
networks:
- postgres
- redis
- celery-worker
ports:
- "5555:5555"
rest-api:
restart: always
build:
context: .
dockerfile: docker/rest-api/Dockerfile
depends_on:
- celery-worker
- flower
volumes:
- .:/usr/src/app
environment:
DATABASE_NAME: hitman_db
DATABASE_USER: hitman
DATABASE_PASSWORD: hitman
DATABASE_HOST: postgres
DATABASE_PORT: 5432
REDIS_URL: redis://redis:6379/0
networks:
- postgres
- redis
ports:
- "8000:8000"
celery-worker:
restart: always
build:
context: .
dockerfile: docker/celery-worker/Dockerfile
volumes:
- .:/usr/src/app
depends_on:
- postgres
- redis
- pgadmin
environment:
DATABASE_NAME: hitman_db
DATABASE_USER: hitman
DATABASE_PASSWORD: hitman
DATABASE_HOST: postgres
DATABASE_PORT: 5432
REDIS_URL: redis://redis:6379/0
networks:
- postgres
- redis
- celery-worker
redis:
image: "redis:alpine"
networks:
- redis
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- postgres
restart: unless-stopped
depends_on:
- postgres
networks:
postgres:
driver: bridge
redis:
driver: bridge
celery-worker:
driver: bridge
volumes:
postgres:
pgadmin: