-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (64 loc) · 1.55 KB
/
docker-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
62
63
64
65
66
67
68
69
version: '3.8'
services:
migrate_db:
image: aaissaut/aaiss:backend
build:
context: ./backend
cache_from:
- aaissaut/aaiss:backend
command: ./manage.py migrate
volumes:
- ./backend/data:/backend-aaiss/data
backend:
depends_on:
migrate_db:
condition: service_completed_successfully
image: aaissaut/aaiss:backend
build:
context: ./backend
cache_from:
- aaissaut/aaiss:backend
command: gunicorn aaiss_backend.wsgi:application --bind 0.0.0.0:6446
environment:
SECRET_KEY: ${SECRET_KEY}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
ZIFY_AUTH: ${ZIFY_AUTH}
volumes:
- ./backend/data:/backend-aaiss/data
- ./backend/static:/backend-aaiss/static
- ./backend/media:/backend-aaiss/media
expose:
- 6446
healthcheck:
test: [ "CMD", "curl", "localhost:6446/admin" ]
timeout: 2s
retries: 10
frontend:
image: aaissaut/aaiss:frontend
build:
context: ./frontend
cache_from:
- aaissaut/aaiss:frontend
volumes:
- static_files:/run/dist
ports:
- "8080:8080"
caddy:
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_completed_successfully
image: caddy:2.7.3
volumes:
- ./deployment/caddy:/etc/caddy
- ./backend/static:/static
- ./backend/media:/media
- static_files:/dist:ro
- caddy_data:/data/caddy
ports:
- "80:80"
- "443:443"
volumes:
caddy_data:
static_files: