Update example docker-compose file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Raoul Snyman 2023-08-05 13:17:52 -07:00
parent ba42fd3374
commit 0e451f0cdd
4 changed files with 12 additions and 2 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
data

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
data

View File

@ -1,7 +1,7 @@
version: '3'
services:
flarum:
build: .
image: git.snyman.info/raoul/flarum:latest
environment:
MYSQL_DATABASE: flarum
MYSQL_USER: flarum
@ -21,10 +21,17 @@ services:
- "8000:80"
depends_on:
- mysql
volumes:
- "./data/extensions:/flarum/app/extensions"
- "./data/assets:/flarum/app/public/assets"
- "./data/storage:/flarum/app/storage"
mysql:
image: mysql
image: mariadb:11
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: flarum
MYSQL_USER: flarum
MYSQL_PASSWORD: flarum
restart: unless-stopped
volumes:
- "./data/mysql:/var/lib/mysql"

View File

@ -2,6 +2,7 @@
set -e
# Wait for MySQL/MariaDB
echo "Waiting for MySQL/MariaDB..."
MAX_RETRY=45
RETRY=1
while ! mysql --protocol TCP -h"$MYSQL_HOST" -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -e "show databases;" > /dev/null 2>&1; do