Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 2.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (82 loc) · 2.16 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# SPDX-FileCopyrightText: 2024 The members of the EXAM Consortium
#
# SPDX-License-Identifier: EUPL-1.2
services:
postgres:
image: postgres:16-alpine
container_name: exam-postgres
environment:
POSTGRES_USER: exam
POSTGRES_PASSWORD: exam
POSTGRES_DB: exam
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/init-test-db.sh:/docker-entrypoint-initdb.d/init-test-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U exam"]
interval: 10s
timeout: 5s
retries: 5
networks:
- exam-network
exam:
build:
context: .
dockerfile: docker/Dockerfile
image: exam-app:latest
container_name: exam-app
environment:
- APP_HOSTNAME=http://localhost
- SMTP_HOST=${SMTP_HOST:-smtp.example.com}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_SSL=${SMTP_SSL:-no}
- SMTP_TLS=${SMTP_TLS:-yes}
- SMTP_USER=${SMTP_USER:-user}
- SMTP_PASSWORD=${SMTP_PASSWORD:-password}
expose:
- "9000"
volumes:
- ./data/attachments:/app/data/attachments
- ./conf/docker.conf:/app/conf/docker.conf:ro
depends_on:
postgres:
condition: service_healthy
networks:
- exam-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9000/app/attributes"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
nginx:
image: nginx:1.27-alpine
container_name: exam-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/${NGINX_CONFIG:-nginx.conf}:/etc/nginx/conf.d/default.conf:ro
- ./docker/ssl:/etc/nginx/ssl:ro
# No need to mount public/ - backend serves assets from JAR
depends_on:
exam:
condition: service_healthy
networks:
- exam-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
postgres_data:
driver: local
# pgadmin_data:
# driver: local
networks:
exam-network:
driver: bridge