-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
115 lines (91 loc) · 1.96 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
113
114
115
services:
frontend:
build:
context: frontend
dockerfile: Dockerfile
container_name: frontend
postgres:
image: postgres
env_file:
- ./.env
container_name: postgres
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
redis:
image: redis/redis-stack:latest
ports:
- "8001:8001"
- "6379:6379"
container_name: redis
volumes:
- redis_volume:/data
pgadmin:
image: dpage/pgadmin4
ports:
- "8002:80"
container_name: pgadmin4
volumes:
- pgadmin_volume:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=user@example.com
- PGADMIN_DEFAULT_PASSWORD=12345
depends_on:
- postgres
backend:
build:
context: ./backend
dockerfile: ./web.Dockerfile
volumes:
- ./backend/src/web:/src/web
env_file:
- ./.env
environment:
POSTGRES_HOST: postgres
REDIS_HOST: redis
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
container_name: backend
expose:
- 80
worker:
build:
context: ./backend
dockerfile: worker.Dockerfile
env_file:
- ./.env
environment:
POSTGRES_HOST: postgres
REDIS_HOST: redis
ports:
- "8080:8080"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
# volumes:
# - ./src/worker:/src/worker/functions
container_name: worker
nginx:
container_name: nginx
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/cors.conf:/etc/nginx/cors.conf
- ./backend/src/web/app/static:/www/data
depends_on:
- backend
- frontend
volumes:
redis_volume: {}
pgdata: {}
pgadmin_volume: