-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (63 loc) · 1.34 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
version: "3.8"
services:
postgres:
container_name: postgres
hostname: postgres
image: postgres:16
restart: unless-stopped
expose:
- 5432
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${POSTGRES_USER}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
redis:
container_name: redis
hostname: redis
image: redis:7.0
restart: unless-stopped
expose:
- 6379
api:
container_name: api
hostname: api
restart: unless-stopped
build:
context: .
dockerfile: api.Dockerfile
entrypoint: /app/entrypoints/server_entrypoint.sh
volumes:
- static_volume:/app/static
expose:
- 8000
depends_on:
- postgres
- redis
worker:
container_name: worker
hostname: worker
build:
context: .
dockerfile: api.Dockerfile
entrypoint: /app/entrypoints/worker_entrypoint.sh
volumes:
- static_volume:/app/static
depends_on:
- postgres
- redis
- api
nginx:
container_name: nginx
hostname: nginx
restart: always
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- static_volume:/app/static
volumes:
static_volume: {}
postgres_data: {}