Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 2.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (66 loc) · 2.47 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
# TCExam development / demo stack (plan Stage 7).
#
# docker compose up --build # or: make up
# then open http://localhost:8080/ and sign in at /admin/code/ (admin / 1234).
#
# The app entrypoint runs the non-interactive installer automatically using the TCEXAM_* settings
# below, so no browser install step is required. The installer is idempotent.
#
# Volumes persist the database, the generated PDF fonts, the cache and the installed configuration
# (including the generated K_RANDOM_SECURITY) across restarts, so the installed instance survives
# `docker compose down` / `up`. For PostgreSQL, swap the db service for a postgres image and set
# TCEXAM_DB_TYPE=POSTGRESQL / TCEXAM_DB_PORT=5432 on the app service.
services:
app:
build: .
image: tecnickcom/tcexam:local
restart: unless-stopped
ports:
- "${TCEXAM_PORT:-8080}:80"
depends_on:
db:
condition: service_healthy
# The entrypoint runs the non-interactive installer with these settings on first start, so no
# browser install step is needed (it is idempotent: existing config and data are preserved).
environment:
TCEXAM_DB_TYPE: MYSQL
TCEXAM_DB_HOST: db
TCEXAM_DB_PORT: "3306"
TCEXAM_DB_NAME: tcexam
TCEXAM_DB_USER: tcexam
TCEXAM_DB_PASSWORD: tcexam
TCEXAM_TABLE_PREFIX: tce_
TCEXAM_PATH_HOST: "http://localhost:${TCEXAM_PORT:-8080}"
TCEXAM_PATH_TCEXAM: /
TCEXAM_PATH_MAIN: /var/www/html/
TCEXAM_STANDARD_PORT: "${TCEXAM_PORT:-8080}"
volumes:
- tcexam_fonts:/var/www/html/vendor/tecnickcom/tc-lib-pdf-font/target/fonts
- tcexam_cache:/var/www/html/cache
# Persist the installed configuration (incl. the generated K_RANDOM_SECURITY) so the
# instance survives `docker compose down` / `up`, like the database and font volumes.
- tcexam_config_shared:/var/www/html/shared/config
- tcexam_config_admin:/var/www/html/admin/config
- tcexam_config_public:/var/www/html/public/config
db:
image: mariadb:11
restart: unless-stopped
environment:
MARIADB_DATABASE: tcexam
MARIADB_USER: tcexam
MARIADB_PASSWORD: tcexam
MARIADB_ROOT_PASSWORD: root
volumes:
- tcexam_db:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 30
volumes:
tcexam_db:
tcexam_fonts:
tcexam_cache:
tcexam_config_shared:
tcexam_config_admin:
tcexam_config_public: