-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
flarum.yml
68 lines (64 loc) · 1.95 KB
/
flarum.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
# DOMAIN=example.com docker stack deploy -c flarum.yml flarum
services:
flarum:
image: mondedie/flarum:${VERSION:-stable}
working_dir: /flarum/app/
command:
- /bin/sh
- -c
- |
apk add --no-cache mysql-client
while ! mysqladmin ping -h"$$DB_HOST" --silent; do
echo "Wait Mysql..."
sleep 1
done
composer require flarum-lang/french -W
composer require fof/user-directory -W
php flarum cache:clear
/usr/local/bin/startup
environment:
- FORUM_URL=${SCHEME:-https}://${DOMAIN:-flarum.localhost}
- FLARUM_ADMIN_USER=${ADMIN_USER:-admin}
- FLARUM_ADMIN_PASS=${ADMIN_PASSWORD:-myp@ssw0rd}
- FLARUM_ADMIN_MAIL=${ADMIN_EMAIL:[email protected]}
- FLARUM_TITLE=${FLARUM_TITLE:-Flarum}
- DB_HOST=mariadb
- DB_USER=flarum
- DB_NAME=flarum
- DB_PASS=myp@ssw0rd
volumes:
- ${VOLUME_PATH}assets:/flarum/app/public/assets
- ${VOLUME_PATH}extensions:/flarum/app/extensions
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.flarum-${NUMBER:-1}.rule=Host(`${DOMAIN:-flarum.localhost}`)
- traefik.http.routers.flarum-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.flarum-${NUMBER:-1}.service=flarum-${NUMBER:-1}
- traefik.http.routers.flarum-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.flarum-${NUMBER:-1}.loadbalancer.server.port=8888
networks:
- internal
- traefik
mariadb:
image: mariadb:10.5.9
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql:cached
environment:
- MYSQL_ROOT_PASSWORD=myp@ssw0rd
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=myp@ssw0rd
networks:
- internal
volumes:
mariadb:
assets:
extensions:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net