-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.19 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
services:
api:
image: ${DOCKER_BASE}-api
build:
context: ./geoshop-back/
env_file: ${ENV_FILE:-.env}
command: "gunicorn wsgi -b :8000 --timeout 90"
depends_on:
migrate:
condition: service_completed_successfully
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://127.0.0.1:8000/health/readiness || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
ports:
- "${DOCKER_BACK_PORT}:8000"
volumes:
- "static-files:/app/geoshop_back/static:ro"
- "${GEOSHOP_DATA}:/mnt/geoshop_data:rw"
migrate:
image: ${DOCKER_BASE}-api
build:
context: ./geoshop-back/
dockerfile: Dockerfile
env_file: ${ENV_FILE:-.env}
command:
- bash
- -c
- "python3 manage.py migrate && python3 manage.py collectstatic --noinput && python3 manage.py fixturize"
volumes:
- "static-files:/app/geoshop_back/static:rw"
front:
image: ${DOCKER_BASE}-front
build:
context: ./front/
args:
FRONT_HREF: ${FRONT_HREF}
restart: unless-stopped
ports:
- "${DOCKER_FRONT_PORT}:80"
volumes:
static-files: