-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
87 lines (81 loc) · 2.02 KB
/
docker-compose.yml
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
version: '3'
services:
mediawiki:
build:
context: .
profiles:
- production
- test
restart: always
volumes: &volumes_mediawiki
- ./LocalSettings.php:/var/www/html/LocalSettings.php
- ./composer.json:/var/www/html/composer.json
- ./images:/var/www/html/images
environment: &env_mediawiki
- MEDIAWIKI_SITE_SERVER=${MW_SITE_FQDN}
- MEDIAWIKI_SITE_NAME=My MediaWiki
- MEDIAWIKI_DB_TYPE=mysql
- MEDIAWIKI_DB_HOST=db
- MEDIAWIKI_DB_NAME=mediawiki
- MEDIAWIKI_DB_USER=mediawiki
- MEDIAWIKI_DB_PASSWORD=mediawiki
ports:
- "8080:80"
depends_on:
db:
condition: service_healthy
db:
image: mariadb
restart: always
profiles:
- update_db
- production
- test
environment:
- MYSQL_DATABASE=mediawiki
- MYSQL_USER=mediawiki
- MYSQL_PASSWORD=mediawiki
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./db-init:/docker-entrypoint-initdb.d
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 20s
timeout: 10s
retries: 3
start_period: 40s
caddy:
image: docker.io/library/caddy:2.8-alpine
restart: unless-stopped
entrypoint: caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
env_file: .env
profiles:
- production
ports:
- "443:443"
- "80:80"
volumes:
- caddy-data:/data
- ./config/Caddyfile:/etc/caddy/Caddyfile
depends_on:
- mediawiki
update_db:
build:
context: .
args:
- MW_VERSION=1.31
- UPDATE=1
profiles:
- update_db
environment: *env_mediawiki
volumes:
- ./update-context/LocalSettings.php:/var/www/html/LocalSettings.php
- ./update-context/composer.json:/var/www/html/composer.json
entrypoint: [ "php", "maintenance/update.php", "--quick" ]
depends_on:
db:
condition: service_healthy
volumes:
db-data:
caddy-data: