forked from lkdtr/kamp-yazilimi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
83 lines (80 loc) · 2.05 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
services:
mudur:
build:
&build
context: .
expose:
- 8080
ports:
- "8080:8080"
depends_on:
postgresql:
condition: service_healthy
mudur-prerun:
condition: service_completed_successfully
env_file:
&env_file
- ./.env
volumes:
&volumes
- ./entrypoint.sh:/usr/local/bin/entrypoint.sh # For development purposes only!
- ./kampyazilim.conf:/app/kampyazilim.conf # For development purposes only!
- ./mudur:/app/mudur # For development purposes only!
- django_static:/app/mudur/staticfiles # keep media files secure and ready to be shared with nginx
- django_media:/app/mudur/media # keep media files secure and ready to be shared with nginx
- django_spool_cron:/var/spool/cron # Remember crontab entries
restart: on-failure
healthcheck:
test:
[
"CMD",
"/usr/bin/curl",
"--output",
"/dev/null",
"--silent",
"--show-error",
"--fail",
"localhost:8080"
]
interval: 30s
timeout: 10s
retries: 5
mudur-prerun:
build: *build
env_file: *env_file
volumes: *volumes
entrypoint: [ "bash", "-c", "entrypoint.sh managepy migrate && entrypoint.sh managepy collectstatic --noinput && entrypoint.sh managepy compilemessages" ]
depends_on:
postgresql:
condition: service_healthy
postgresql:
image: postgres:12.11-alpine
tmpfs:
- /run
- /var/cache
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_DB: "${POSTGRES_DB}"
healthcheck:
test:
[
"CMD",
"psql",
"--username",
"${POSTGRES_USER}",
"--command",
"SELECT 1"
]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5433:5432"
volumes:
postgres_data:
django_static:
django_media:
django_spool_cron: