Update example docker-compose file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ba42fd3374
commit
0e451f0cdd
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
data
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
data
|
@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
flarum:
|
flarum:
|
||||||
build: .
|
image: git.snyman.info/raoul/flarum:latest
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: flarum
|
MYSQL_DATABASE: flarum
|
||||||
MYSQL_USER: flarum
|
MYSQL_USER: flarum
|
||||||
@ -21,10 +21,17 @@ services:
|
|||||||
- "8000:80"
|
- "8000:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
|
volumes:
|
||||||
|
- "./data/extensions:/flarum/app/extensions"
|
||||||
|
- "./data/assets:/flarum/app/public/assets"
|
||||||
|
- "./data/storage:/flarum/app/storage"
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql
|
image: mariadb:11
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
MYSQL_DATABASE: flarum
|
MYSQL_DATABASE: flarum
|
||||||
MYSQL_USER: flarum
|
MYSQL_USER: flarum
|
||||||
MYSQL_PASSWORD: flarum
|
MYSQL_PASSWORD: flarum
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- "./data/mysql:/var/lib/mysql"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Wait for MySQL/MariaDB
|
# Wait for MySQL/MariaDB
|
||||||
|
echo "Waiting for MySQL/MariaDB..."
|
||||||
MAX_RETRY=45
|
MAX_RETRY=45
|
||||||
RETRY=1
|
RETRY=1
|
||||||
while ! mysql --protocol TCP -h"$MYSQL_HOST" -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -e "show databases;" > /dev/null 2>&1; do
|
while ! mysql --protocol TCP -h"$MYSQL_HOST" -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -e "show databases;" > /dev/null 2>&1; do
|
||||||
|
Loading…
Reference in New Issue
Block a user