Add initial configuration for Bookstack with environment variables

This commit is contained in:
Tanguy Herbron 2021-11-01 15:47:48 +01:00
parent cf3c5217da
commit c95d3185cd
3 changed files with 43 additions and 0 deletions

6
.env.sample Normal file
View File

@ -0,0 +1,6 @@
MYSQL_ROOT_PASSWORD=
MYSQL_PASSWORD=
MYSQL_DATABASE=bookstackapp
MYSQL_USER=bookstack
APP_URL=http://localhost:6875

36
docker-compose.yml Normal file
View File

@ -0,0 +1,36 @@
version: "3.7"
services:
bookstack:
image: ghcr.io/linuxserver/bookstack
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- APP_URL=${APP_URL}
- DB_HOST=bookstack_db
- DB_USER=${MYSQL_USER}
- DB_PASS=${MYSQL_PASSWORD}
- DB_DATABASE=${MYSQL_DATABASE}
volumes:
- ./config/bookstack:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: ghcr.io/linuxserver/mariadb
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=Europe/Copenhagen
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- ./config/db:/config
restart: unless-stopped

1
start.sh Normal file
View File

@ -0,0 +1 @@
docker-compose --env-file .env up -d