mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
sample compose files, readme updates, fixed seds, symlinks
This commit is contained in:
parent
332c56096a
commit
b17d27643c
26
docker-compose.advanced.yml.sample
Normal file
26
docker-compose.advanced.yml.sample
Normal file
@ -0,0 +1,26 @@
|
||||
version: '3'
|
||||
services:
|
||||
sql:
|
||||
container_name: bookstack_sql
|
||||
image: linuxserver/mariadb
|
||||
volumes:
|
||||
- ./data/sql:/config
|
||||
networks:
|
||||
- net
|
||||
environment:
|
||||
- PUID=setyourID
|
||||
- PGID=setyourGID
|
||||
- MYSQL_ROOT_PASSWORD=SetAPassword
|
||||
bookstack:
|
||||
container_name: bookstack
|
||||
image: linuxserver/bookstack
|
||||
volumes:
|
||||
- ./data/bookstack:/config
|
||||
environment:
|
||||
- ADVANCED_MODE=1
|
||||
- PUID=setyourID
|
||||
- PGID=setyourGID
|
||||
networks:
|
||||
- net
|
||||
networks:
|
||||
net:
|
||||
30
docker-compose.basic.yml.sample
Normal file
30
docker-compose.basic.yml.sample
Normal file
@ -0,0 +1,30 @@
|
||||
version: '3'
|
||||
services:
|
||||
sql:
|
||||
container_name: bookstack_sql
|
||||
image: linuxserver/mariadb
|
||||
volumes:
|
||||
- ./data/sql:/config
|
||||
networks:
|
||||
- net
|
||||
environment:
|
||||
- PUID=setyourID
|
||||
- PGID=setyourGID
|
||||
- MYSQL_ROOT_PASSWORD=SetAPassword
|
||||
bookstack:
|
||||
container_name: bookstack
|
||||
image: linuxserver/bookstack
|
||||
volumes:
|
||||
- ./data/bookstack:/config
|
||||
environment:
|
||||
- DB_USER=bookstack
|
||||
- DB_PASS=SetAPassword
|
||||
- DB_DATABASE=bookstack
|
||||
- DB_HOST=bookstack_sql
|
||||
- "APP_URL=https://your.url.when.using.reverse.proxy"
|
||||
- PUID=setyourID
|
||||
- PGID=setyourGID
|
||||
networks:
|
||||
- net
|
||||
networks:
|
||||
net:
|
||||
@ -30,6 +30,7 @@ param_env_vars:
|
||||
- { env_var: "DB_PASS", env_value: "<yourdbpass>", desc: "for specifying the database password" }
|
||||
- { env_var: "DB_DATABASE", env_value: "bookstackapp", desc: "for specifying the database to be used" }
|
||||
- { env_var: "APPURL", env_value: "your.site.here.xyz", desc: "for specifying the url your application will be accessed on "}
|
||||
- { env_var: "ADVANCED_MODE", env_value: "1", desc: "enables advanced mode for direct editing of the .env - scroll down for details on this"}
|
||||
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
@ -62,7 +63,19 @@ app_setup_block: |
|
||||
|
||||
Documentation can be found at https://www.bookstackapp.com/docs/
|
||||
|
||||
### Advanced Mode
|
||||
We have implemented a special 'advanced mode' where users who wish to leverage the built in SMTP or LDAP functionality, will have the ability to edit the .env by hand. With `ADVANCED_MODE=1` set when
|
||||
the container is created, it will copy the .env.example to /config within the container. You can then edit this file on the host system (make sure you read the BookStack docs) and restart the
|
||||
container when finished. When the container starts, it copies /config/.env to /var/www/html/.env within the container for the web app to use. It will do this every time the container restarts.
|
||||
|
||||
Note, the APP_KEY is still set by PHP environment so you do not need to worrry about this.
|
||||
|
||||
### Composer
|
||||
|
||||
Some simple docker-compose files are included for you to get started with. You will still need to manually configure the SQL server, but the compose files will get the stack running for you.
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "08.10.18:", desc: "Advanced mode, symlink changes, sed fixing, docs updated, added some composer files"}
|
||||
- { date: "23.09.28:", desc: "Updates pre-release"}
|
||||
- { date: "02.07.18:", desc: "Initial Release." }
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# create directory structure
|
||||
mkdir -p \
|
||||
/config/www/{files,images,uploads,logs}
|
||||
/config/www/{storage,public}
|
||||
|
||||
# create symlinks
|
||||
symlinks=( \
|
||||
@ -21,7 +21,7 @@ done
|
||||
# If not set, runs in basic mode where .example.env is copied to /var/www/html/.env and seds are applied to set documented variables
|
||||
if [ "$ADVANCED_MODE" == 1 ];
|
||||
then
|
||||
echo "Advanced Mode Enabled - Syncing .env from /config to /var/www/html"
|
||||
echo "Advanced Mode Enabled - Syncing .env from /config to /var/www/html - if you're doing this you better read the BookStack documentation. Restart container after making changes to .env"
|
||||
[[ ! -f "/config/.env" ]] && \
|
||||
cp /var/www/html/.env.example /config/.env
|
||||
cp /config/.env /var/www/html/.env
|
||||
@ -35,7 +35,9 @@ elif [ -z "$ADVANCED_MODE" ];
|
||||
sed -i "s/DB_DATABASE=database_database/DB_DATABASE=${DB_DATABASE}/g" /var/www/html/.env
|
||||
sed -i "s/DB_USERNAME=database_username/DB_USERNAME=${DB_USER}/g" /var/www/html/.env
|
||||
sed -i "s/DB_PASSWORD=database_user_password/DB_PASSWORD=${DB_PASS}/g" /var/www/html/.env
|
||||
sed -i "s/# APP_URL=http://bookstack.dev/APP_URL=${APP_URL}/g" /var/www/html/.env
|
||||
elif [ "$APP_URL" ]
|
||||
echo "App URL Set"
|
||||
sed -i "s,#\sAPP_URL.*,APP_URL=${APP_URL},g" /var/www/html/.env
|
||||
else
|
||||
echo "Nothing to do with .env - what did you do homer?"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user