awesome-stacks/stacks/yeswiki.yml
2024-10-07 01:24:30 +02:00

57 lines
1.5 KiB
Docker

# DOMAIN=example.com docker stack deploy -c yeswiki.yml yeswiki
services:
web:
image: ethibox/yeswiki:${VERSION:-latest}
command:
- /bin/sh
- -c
- |
rm -rf /var/www/html/*
git clone https://github.com/YesWiki/yeswiki/ /var/www/html
composer install
chmod 777 cache
chown -R www-data:www-data .
apache2-foreground
volumes:
- ${VOLUME_PATH}data:/var/www/html
environment:
- YESWIKI_MYSQL_HOST=mariadb
- YESWIKI_MYSQL_USER=yeswiki
- YESWIKI_MYSQL_PASSWORD=myp@ssw0rd
- YESWIKI_MYSQL_DATABASE=yeswiki
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.yeswiki-${NUMBER:-1}.rule=Host(`${DOMAIN:-yeswiki.localhost}`)
- traefik.http.routers.yeswiki-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.yeswiki-${NUMBER:-1}.service=yeswiki-${NUMBER:-1}
- traefik.http.routers.yeswiki-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.yeswiki-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- traefik
- internal
mariadb:
image: mariadb:10.5.9
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql:cached
environment:
- MYSQL_ROOT_PASSWORD=myp@ssw0rd
- MYSQL_DATABASE=yeswiki
- MYSQL_USER=yeswiki
- MYSQL_PASSWORD=myp@ssw0rd
networks:
- internal
volumes:
mariadb:
data:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net