From c95d3185cd3c6b90efa48dfeed0d3154a510e346 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 1 Nov 2021 15:47:48 +0100 Subject: [PATCH] Add initial configuration for Bookstack with environment variables --- .env.sample | 6 ++++++ docker-compose.yml | 36 ++++++++++++++++++++++++++++++++++++ start.sh | 1 + 3 files changed, 43 insertions(+) create mode 100644 .env.sample create mode 100644 docker-compose.yml create mode 100644 start.sh diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..24d55d6 --- /dev/null +++ b/.env.sample @@ -0,0 +1,6 @@ +MYSQL_ROOT_PASSWORD= +MYSQL_PASSWORD= +MYSQL_DATABASE=bookstackapp +MYSQL_USER=bookstack + +APP_URL=http://localhost:6875 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5e45d0e --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..7fb29d6 --- /dev/null +++ b/start.sh @@ -0,0 +1 @@ +docker-compose --env-file .env up -d