-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
73 lines (71 loc) · 1.54 KB
/
compose.yaml
File metadata and controls
73 lines (71 loc) · 1.54 KB
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
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_DB: myuser
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myuser"]
interval: 1s
timeout: 10s
retries: 30
web:
build: .
command: python manage.py boot
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_DB: myuser
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
healthcheck:
test: ["CMD", "ping localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- staticfiles:/staticfiles
broker:
image: redis
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 1s
timeout: 10s
retries: 30
worker:
build: .
command: celery -A GHCwebsite worker --purge -l INFO
environment:
POSTGRES_DB: myuser
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
depends_on:
db:
condition: service_healthy
broker:
condition: service_healthy
setup:
build: .
command: python manage.py auto_setup
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_DB: myuser
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- staticfiles:/staticfiles
volumes:
database:
redis_data:
staticfiles: