-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
61 lines (61 loc) · 1.34 KB
/
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
services:
redis:
image: "redis:7.2-alpine"
restart: always
healthcheck:
test: redis-cli PING || exit 1
interval: 1m
timeout: 10s
retries: 3
db:
image: "postgres:16.2-alpine"
restart: always
volumes:
- ./db/.pgdata:/var/lib/postgresql/data/
expose:
- $POSTGRES_PORT
environment:
POSTGRES_HOST: $POSTGRES_HOST
POSTGRES_DB: $POSTGRES_NAME
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
PGPORT: $POSTGRES_PORT
healthcheck:
test: echo 'SELECT 1' | PGPASSWORD=$POSTGRES_PASSWORD psql --host $$HOSTNAME --port $POSTGRES_PORT --user $POSTGRES_USER $POSTGRES_NAME
interval: 1m
timeout: 10s
retries: 3
migrate:
build: ./
restart: on-failure
command: sh docker/entrypoints/migrate.sh
depends_on:
- db
- redis
django:
build: ./
expose:
- 8000
restart: always
command: sh docker/entrypoints/django.sh
depends_on:
- db
- redis
- migrate
celery:
build: ./
restart: on-failure
command: sh docker/entrypoints/celery.sh
depends_on:
- db
- redis
- django
celerybeat:
build: ./
restart: on-failure
command: sh docker/entrypoints/celerybeat.sh
depends_on:
- db
- redis
- django
- celery