forked from sbpp/sourcebans-pp
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (105 loc) · 3.67 KB
/
docker-compose.yml
File metadata and controls
110 lines (105 loc) · 3.67 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Local development stack for SourceBans++.
# See docker/README.md for the full guide. Quick start:
# ./sbpp.sh up # build + start everything
# ./sbpp.sh logs # tail web/db logs
# open http://localhost:8080 # panel — login admin / admin
#
# This file is for development only. Do NOT use it in production: it ships a
# known admin password, exposes the database port to the host, and the dev
# image defines `SBPP_DEV_KEEP_INSTALL` (issue #1335 C1) so init.php's
# install/ + updater/ presence guard skips during dev.
services:
web:
build:
context: .
dockerfile: docker/Dockerfile
image: sbpp-dev-web:latest
container_name: sbpp-web
depends_on:
db:
condition: service_healthy
ports:
- "${SBPP_WEB_PORT:-8080}:80"
environment:
DB_HOST: db
DB_PORT: 3306
DB_NAME: sourcebans
DB_USER: sourcebans
DB_PASS: sourcebans
DB_PREFIX: sb
DB_CHARSET: utf8mb4
SB_EMAIL: admin@example.test
# SB_SECRET_KEY is generated on first boot if empty.
SB_SECRET_KEY: ""
STEAMAPIKEY: ""
volumes:
- ./web:/var/www/html/web
# Keep generated/cached content off the host bind mount so composer
# install and Smarty compile output don't fight with the host.
- vendor:/var/www/html/web/includes/vendor
- cache:/var/www/html/web/cache
- smarty:/var/www/html/web/templates_c
# Read-only mount of the docker/ tree so file-shape integration
# tests under web/tests/integration/ can read the production
# Apache + entrypoint config they're gating without leaving the
# container. CI's `actions/checkout@v4` pulls the full repo, so
# `web/../docker/...` resolves naturally there; this mount keeps
# the local `./sbpp.sh test` runner symmetric with CI.
- ./docker:/var/www/html/docker:ro
# Read-only mounts of the docs tree + the two root-level markdown
# files (AGENTS.md / CHANGELOG.md) for the same reason as the
# docker/ mount above: file-shape integration tests under
# web/tests/integration/ that gate sbpp.github.io deep-links
# (DocsUpgradeLinkRegressionTest, #1474) need to verify that the
# docs source file backing a panel-side URL still exists AND
# carries the expected heading, AND that no panel/docs source
# references the broken slug. CI's actions/checkout@v4 sees the
# full repo on the runner; these mounts keep local `./sbpp.sh
# test` symmetric.
- ./docs:/var/www/html/docs:ro
- ./AGENTS.md:/var/www/html/AGENTS.md:ro
- ./CHANGELOG.md:/var/www/html/CHANGELOG.md:ro
db:
image: mariadb:10.11
container_name: sbpp-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: sourcebans
MYSQL_USER: sourcebans
MYSQL_PASSWORD: sourcebans
DB_PREFIX: sb
DB_CHARSET: utf8mb4
ports:
- "${SBPP_DB_PORT:-3307}:3306"
volumes:
- dbdata:/var/lib/mysql
- ./docker/db-init:/docker-entrypoint-initdb.d:ro
- ./web/install/includes/sql:/sbpp-sql:ro
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 20
adminer:
image: adminer:4
container_name: sbpp-adminer
depends_on:
- db
ports:
- "${SBPP_ADMINER_PORT:-8081}:8080"
environment:
ADMINER_DEFAULT_SERVER: db
ADMINER_DESIGN: pepa-linha
mailpit:
image: axllent/mailpit:latest
container_name: sbpp-mailpit
ports:
- "${SBPP_MAILPIT_UI_PORT:-8025}:8025"
- "${SBPP_MAILPIT_SMTP_PORT:-1025}:1025"
environment:
MP_MAX_MESSAGES: 500
volumes:
dbdata:
vendor:
cache:
smarty: