-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yaml
59 lines (55 loc) · 1.33 KB
/
docker-compose.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
version: "3"
services:
server:
build: &app-build
context: .
dockerfile: Dockerfile
args:
PYTHON_BUILD_VERSION: "3.11"
environment: &app-environment
DEBUG: "False"
RUN_MIGRATIONS: "True"
DJANGO_SECRET_KEY: "insecure-key-fill-with-your-own"
# Postgres params
POSTGRES_HOST: "db"
POSTGRES_PORT: "5432"
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
# Redis params
REDISHOST: "redis"
REDISPORT: "6379"
REDISUSER: "default"
REDISPASSWORD: "asd"
depends_on: &app-depends-on
- db
- redis
command: /app/deployment/server-entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/healthcheck/"]
interval: 5s
ports:
- 8000:8000
worker:
build: *app-build
environment: *app-environment
depends_on: *app-depends-on
command: /app/deployment/worker-entrypoint.sh
redis:
restart: unless-stopped
image: redis:latest
expose:
- 6379
db:
image: postgres:14.0-alpine
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
expose:
- 5432
volumes:
postgres_data: {}