-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.5 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
services:
web:
image: docker.io/crinis/sourcebans:latest
environment:
# SourceBans++ is installed automatically on first start.
# Set INSTALL to 'true' for a single start to force-update the sources
# (overwrites themes/default, updater, install, pages and includes),
# then set it back to 'false'. Always create a backup first.
INSTALL: 'false'
# When the container starts as root, ownership of /var/www/html is given
# to the webserver user on every start. Disable with 'false'.
SET_OWNER: 'true'
depends_on:
db:
condition: service_healthy
networks:
- db
ports:
# Change the port before the colon to whatever you want to use.
# The container listens on port 8080 internally.
- "80:8080"
volumes:
- sourcebans:/var/www/html/
db:
image: docker.io/library/mariadb:11
environment:
MARIADB_USER: sourcebans
# Define the passwords in an .env file next to this compose file:
# DB_PASSWORD=...
# DB_ROOT_PASSWORD=...
MARIADB_PASSWORD: ${DB_PASSWORD:?set DB_PASSWORD in .env}
MARIADB_DATABASE: sourcebans
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?set DB_ROOT_PASSWORD in .env}
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- mysql:/var/lib/mysql
networks:
- db
networks:
db:
volumes:
sourcebans:
mysql: