mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
Merge pull request #187 from linuxserver/queues
This commit is contained in:
commit
b979032c09
@ -9,8 +9,7 @@ ARG BOOKSTACK_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="homerr"
|
||||
|
||||
# package versions
|
||||
ARG BOOKSTACK_RELEASE
|
||||
ENV S6_STAGE2_HOOK="/init-hook"
|
||||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
|
||||
@ -9,8 +9,7 @@ ARG BOOKSTACK_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="homerr"
|
||||
|
||||
# package versions
|
||||
ARG BOOKSTACK_RELEASE
|
||||
ENV S6_STAGE2_HOOK="/init-hook"
|
||||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
|
||||
@ -89,7 +89,7 @@ Below is a mapping of container `/config` paths to those relative within a BookS
|
||||
|
||||
### Advanced Users (full control over the .env file)
|
||||
If you wish to use the extra functionality of BookStack such as email, Memcache, LDAP and so on you will need to make your own .env file with guidance from the BookStack documentation.
|
||||
|
||||
|
||||
When you create the container, do not set any arguments for any SQL settings. The container will copy an exemplary .env file to /config/www/.env on your host system for you to edit.
|
||||
|
||||
## Usage
|
||||
@ -152,6 +152,7 @@ docker run -d \
|
||||
-e DB_USER=<yourdbuser> \
|
||||
-e DB_PASS=<yourdbpass> \
|
||||
-e DB_DATABASE=bookstackapp \
|
||||
-e QUEUE_CONNECTION= `#optional` \
|
||||
-p 6875:80 \
|
||||
-v /path/to/data:/config \
|
||||
--restart unless-stopped \
|
||||
@ -175,6 +176,7 @@ Container images are configured using parameters passed at runtime (such as thos
|
||||
| `-e DB_USER=<yourdbuser>` | for specifying the database user |
|
||||
| `-e DB_PASS=<yourdbpass>` | for specifying the database password (minimum 4 characters & non-alphanumeric passwords must be properly escaped.) |
|
||||
| `-e DB_DATABASE=bookstackapp` | for specifying the database to be used |
|
||||
| `-e QUEUE_CONNECTION=` | Set to `database` to enable async actions like sending email or triggering webhooks. |
|
||||
| `-v /config` | this will store any uploaded data on the docker host |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
@ -25,19 +25,20 @@ param_volumes:
|
||||
param_usage_include_env: true
|
||||
param_env_vars:
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
|
||||
- { env_var: "APP_URL", env_value: "<yourbaseurl>", desc: "for specifying the IP:port or URL your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com`"}
|
||||
- { env_var: "DB_HOST", env_value: "<yourdbhost>", desc: "for specifying the database host" }
|
||||
- { env_var: "DB_PORT", env_value: "<yourdbport>", desc: "for specifying the database port if not default 3306" }
|
||||
- { env_var: "DB_USER", env_value: "<yourdbuser>", desc: "for specifying the database user" }
|
||||
- { env_var: "DB_PASS", env_value: "<yourdbpass>", desc: "for specifying the database password (minimum 4 characters & non-alphanumeric passwords must be properly escaped.)" }
|
||||
- { env_var: "APP_URL", env_value: "yourbaseurl", desc: "for specifying the IP:port or URL your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com`"}
|
||||
- { env_var: "DB_HOST", env_value: "yourdbhost", desc: "for specifying the database host" }
|
||||
- { env_var: "DB_PORT", env_value: "yourdbport", desc: "for specifying the database port if not default 3306" }
|
||||
- { env_var: "DB_USER", env_value: "yourdbuser", desc: "for specifying the database user" }
|
||||
- { env_var: "DB_PASS", env_value: "yourdbpass", desc: "for specifying the database password (minimum 4 characters & non-alphanumeric passwords must be properly escaped.)" }
|
||||
- { env_var: "DB_DATABASE", env_value: "bookstackapp", desc: "for specifying the database to be used" }
|
||||
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "6875", internal_port: "80", port_desc: "will map the container's port 80 to port 6875 on the host" }
|
||||
|
||||
opt_param_usage_include_env: false
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "QUEUE_CONNECTION", env_value: "", desc: "Set to `database` to enable async actions like sending email or triggering webhooks. See [documentation](https://www.bookstackapp.com/docs/admin/email-webhooks/#async-action-handling)." }
|
||||
|
||||
custom_compose: |
|
||||
---
|
||||
@ -85,7 +86,7 @@ app_setup_block: |
|
||||
|
||||
This application is dependent on a MySQL database be it one you already have or a new one. If you do not already have one, set up our MariaDB container here https://hub.docker.com/r/linuxserver/mariadb/.
|
||||
|
||||
|
||||
|
||||
If you intend to use this application behind a subfolder reverse proxy, such as our SWAG container or Traefik you will need to make sure that the `APP_URL` environment variable is set to your external domain, or it will not work.
|
||||
|
||||
Documentation for BookStack can be found at https://www.bookstackapp.com/docs/.
|
||||
@ -106,7 +107,7 @@ app_setup_block: |
|
||||
|
||||
### Advanced Users (full control over the .env file)
|
||||
If you wish to use the extra functionality of BookStack such as email, Memcache, LDAP and so on you will need to make your own .env file with guidance from the BookStack documentation.
|
||||
|
||||
|
||||
When you create the container, do not set any arguments for any SQL settings. The container will copy an exemplary .env file to /config/www/.env on your host system for you to edit.
|
||||
|
||||
|
||||
|
||||
6
root/etc/s6-overlay/s6-rc.d/svc-queue-worker/run
Executable file
6
root/etc/s6-overlay/s6-rc.d/svc-queue-worker/run
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
echo "*** Starting Async Action Queue ***"
|
||||
|
||||
exec /usr/bin/php /app/www/artisan queue:work --sleep=3 --tries=1 --max-time=3600
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-queue-worker/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-queue-worker/type
Normal file
@ -0,0 +1 @@
|
||||
longrun
|
||||
9
root/init-hook
Executable file
9
root/init-hook
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -n "${QUEUE_CONNECTION}" ]]; then
|
||||
touch /etc/s6-overlay/s6-rc.d/user/contents.d/svc-queue-worker
|
||||
fi
|
||||
|
||||
exec \
|
||||
/docker-mods
|
||||
Loading…
x
Reference in New Issue
Block a user