-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (57 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (57 loc) · 1.38 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
services:
api:
image: ${DOCKER_BASE}-api
build:
context: ./geoshop-back/
env_file: ${ENV_FILE:-.env}
command: "gunicorn wsgi -b :8000 --worker-class=gthread --threads=10 --workers=5 --timeout=180 --max-requests=1000 --max-requests-jitter=100"
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"
networks:
- geoshop
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"
volumes:
- "static-files:/app/geoshop_back/static:rw"
networks:
- geoshop
front:
image: ${DOCKER_BASE}-front
build:
context: ./front/
args:
FRONT_HREF: ${FRONT_HREF}
restart: unless-stopped
ports:
- "${DOCKER_FRONT_PORT}:80"
networks:
- geoshop
networks:
geoshop:
driver: bridge
volumes:
static-files: