104 lines
4.0 KiB
YAML
104 lines
4.0 KiB
YAML
---
|
|
services:
|
|
|
|
# The container for BookStack itself
|
|
bookstack:
|
|
# You should update the version here to match the latest
|
|
# release of BookStack: https://github.com/BookStackApp/BookStack/releases
|
|
# You'll change this when wanting to update the version of BookStack used.
|
|
image: lscr.io/linuxserver/bookstack:latest
|
|
container_name: bookstack
|
|
environment:
|
|
- PUID=${PUID}
|
|
- PGID=${PGID}
|
|
- TZ=Etc/UTC
|
|
# APP_URL must be set as the base URL you'd expect to access BookStack
|
|
# on via the browser. The default shown here is what you might use if accessing
|
|
# direct from the browser on the docker host, hence the use of the port as configured below.
|
|
- APP_URL=${APP_URL}
|
|
# APP_KEY must be a unique key. Generate your own by running
|
|
# docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
|
|
# You should keep the "base64:" part for the option value.
|
|
- APP_KEY=${API_KEY}
|
|
|
|
# The below database details are purposefully aligned with those
|
|
# configuted for the "mariadb" service below:
|
|
- DB_HOST=mariadb
|
|
- DB_PORT=3306
|
|
- DB_DATABASE=${DB_DATABASE}
|
|
- DB_USERNAME=${DB_USERNAME}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
|
|
# SAML
|
|
# configured for authentik
|
|
- AUTH_METHOD=${AUTH_METHOD}
|
|
- AUTH_AUTO_INITIATE=${AUTH_AUTO_INITIATE}
|
|
- SAML2_NAME=${SAML2_NAME}
|
|
- SAML2_EMAIL_ATTRIBUTE=${SAML2_EMAIL_ATTRIBUTE}
|
|
- SAML2_EXTERNAL_ID_ATTRIBUTE=${SAML2_EXTERNAL_ID_ATTRIBUTE}
|
|
- SAML2_USER_TO_GROUPS=${SAML2_USER_TO_GROUPS}
|
|
- SAML2_GROUP_ATTRIBUTE=${SAML2_GROUP_ATTRIBUTE}
|
|
- SAML2_DISPLAY_NAME_ATTRIBUTES=${SAML2_DISPLAY_NAME_ATTRIBUTES}
|
|
- SAML2_IDP_ENTITYID=${SAML2_IDP_ENTITYID}
|
|
- SAML2_AUTOLOAD_METADATA=${SAML2_AUTOLOAD_METADATA}
|
|
- SAML2_USER_TO_GROUPS=true
|
|
- SAML2_GROUP_ATTRIBUTE=groups
|
|
- SAML2_REMOVE_FROM_GROUPS=false
|
|
|
|
|
|
# SMTP
|
|
- MAIL_DRIVER=${MAIL_DRIVER}
|
|
- MAIL_HOST=${MAIL_HOST}
|
|
- MAIL_PORT=${MAIL_PORT}
|
|
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
|
|
- MAIL_USERNAME=${MAIL_USERNAME}
|
|
- MAIL_PASSWORD=${MAIL_PASSWORD}
|
|
- MAIL_FROM=${MAIL_FROM}
|
|
- MAIL_FROM_NAME=${MAIL_FROM_NAME}
|
|
volumes:
|
|
# You generally only ever need to map this one volume.
|
|
# This maps it to a "bookstack_app_data" folder in the same
|
|
# directory as this compose config file.
|
|
- bookstack_app:/config
|
|
ports:
|
|
# This exposes port 6875 for general web access.
|
|
# Commonly you'd have a reverse proxy in front of this,
|
|
# redirecting incoming requests to this port.
|
|
- 6875:80
|
|
restart: unless-stopped
|
|
|
|
# The container for the database which BookStack will use to store
|
|
# most of its core data/content.
|
|
mariadb:
|
|
# You should update the version here to match the latest
|
|
# main version of the linuxserver mariadb container version:
|
|
# https://github.com/linuxserver/docker-mariadb/pkgs/container/mariadb/versions?filters%5Bversion_type%5D=tagged
|
|
image: lscr.io/linuxserver/mariadb:latest
|
|
container_name: bookstack-mariadb
|
|
environment:
|
|
- PUID=${PUID}
|
|
- PGID=${PGID}
|
|
- TZ=Etc/UTC
|
|
# You may want to change the credentials used below,
|
|
# but be aware the latter three options need to align
|
|
# with the DB_* options for the BookStack container.
|
|
- MYSQL_ROOT_PASSWORD=${DB_ROOTPASS}
|
|
- MYSQL_DATABASE=${DB_DATABASE}
|
|
- MYSQL_USER=${DB_USERNAME}
|
|
- MYSQL_PASSWORD=${DB_PASSWORD}
|
|
volumes:
|
|
# You generally only ever need to map this one volume.
|
|
# This maps it to a "bookstack_db_data" folder in the same
|
|
# directory as this compose config file.
|
|
- bookstack_db:/config
|
|
|
|
# These ports are commented out as you don't really need this port
|
|
# exposed for normal use, mainly only if connecting direct the the
|
|
# database externally. Otherwise, this risks exposing access to the
|
|
# database when not needed.
|
|
# ports:
|
|
# - 3306:3306
|
|
restart: unless-stopped
|
|
volumes:
|
|
bookstack_app:
|
|
bookstack_db: |