-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
93 lines (80 loc) · 1.52 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
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
version: "3"
services:
db:
image: postgres:16
restart: always
env_file:
- .env
expose:
- '5432'
volumes:
- pg_data:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 15s
retries: 5
app:
build: .
tty: true
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
ports:
- '8001:8000'
volumes:
- .:/app
depends_on:
- db
#db: (к тесту проверки здоровья БД)
#condition: service_healthy
# REDIS
redis:
image: redis
ports:
- '6379:6379'
# CELERY
celery:
build: .
tty: true
env_file:
- .env
command: celery -A config worker -l INFO
depends_on:
- redis
- db
- app
# CELERY-BEAT
celery_beat:
build: .
restart: always
env_file:
- .env
tty: true
command: celery -A config beat -l INFO -S django
depends_on:
- redis
- db
- app
volumes:
pg_data:
#version: '3'
#
#services:
# # database POSTGRES
# db:
# image: postgres
#
# environment:
# POSTGRES_PASSWORD: mysecretpassword
# PGDATA: /var/lib/postgresql/data/pgdata
#
# volumes:
# - pg_data:/var/lib/postgresql/data/pgdata
# ports:
# - '5432:5432'
# тест проверки здоровья БД
#healthcheck:
#test: [ "CMD-SHELL", "pg_isready" ]
#interval: 10s
#timeout: 5s
#retries: 5
# OUR APP