Skip to content

Attempt to remove any and all ambiguity from the readme instructions. #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The architectures supported by this image are:

The default username is admin@admin.com with the password of **password**, access the container at http://<host ip>:6875.

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/.
This application is dependent on a MariaDB database, be it one you already have or a new one. If you do not already have one, we provide an image here https://github.com/linuxserver/docker-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.

Expand Down Expand Up @@ -95,9 +95,9 @@ docker exec -it bookstack php /app/www/artisan bookstack:update-url ${OLD_URL} $

### 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.
If you wish to use the extra functionality of BookStack such as email, LDAP and so on you will need to set additional environment variables or 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.
The container will copy an exemplary .env file to /config/www/.env on your host system for you to use.


## Usage
Expand Down Expand Up @@ -159,14 +159,14 @@ Containers are configured using parameters passed at runtime (such as those abov

| Parameter | Function |
| :----: | --- |
| `-p 80` | will map the container's port 80 to port 6875 on the host |
| `-p 80` | http/s web interface. |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e APP_URL=` | The IP:port or URL your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com` |
| `-e APP_KEY=` | Session encryption key. Can be generated with `docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey` |
| `-e APP_URL=` | The protocol, IP/URL, and port that your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com` |
| `-e APP_KEY=` | Session encryption key. You will need to generate this with `docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey` |
| `-e DB_HOST=` | The database instance hostname |
| `-e DB_PORT=3306` | Database port (default `3306`) |
| `-e DB_PORT=3306` | Database port |
| `-e DB_USERNAME=` | Database user |
| `-e DB_PASSWORD=` | Database password (minimum 4 characters & non-alphanumeric passwords must be properly escaped.) |
| `-e DB_DATABASE=` | Database name |
Expand Down
14 changes: 7 additions & 7 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files" }
param_usage_include_env: true
param_env_vars:
- { env_var: "APP_URL", env_value: "", desc: "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: "APP_KEY", env_value: "", desc: "Session encryption key. Can be generated with `docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey`"}
- { env_var: "APP_URL", env_value: "", desc: "The protocol, IP/URL, and port that your application will be accessed on (ie. `http://192.168.1.1:6875` or `https://bookstack.mydomain.com`"}
- { env_var: "APP_KEY", env_value: "", desc: "Session encryption key. You will need to generate this with `docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey`"}
- { env_var: "DB_HOST", env_value: "", desc: "The database instance hostname" }
- { env_var: "DB_PORT", env_value: "3306", desc: "Database port (default `3306`)" }
- { env_var: "DB_PORT", env_value: "3306", desc: "Database port" }
- { env_var: "DB_USERNAME", env_value: "", desc: "Database user" }
- { env_var: "DB_PASSWORD", env_value: "", desc: "Database password (minimum 4 characters & non-alphanumeric passwords must be properly escaped.)" }
- { env_var: "DB_DATABASE", env_value: "", desc: "Database name" }

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" }
- { external_port: "6875", internal_port: "80", port_desc: "http/s web interface." }

opt_param_usage_include_env: true
opt_param_env_vars:
Expand All @@ -46,7 +46,7 @@ app_setup_block: |

The default username is admin@admin.com with the password of **password**, access the container at http://<host ip>:6875.

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/.
This application is dependent on a MariaDB database, be it one you already have or a new one. If you do not already have one, we provide an image here https://github.com/linuxserver/docker-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.

Expand Down Expand Up @@ -77,9 +77,9 @@ 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.
If you wish to use the extra functionality of BookStack such as email, LDAP and so on you will need to set additional environment variables or 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.
The container will copy an exemplary .env file to /config/www/.env on your host system for you to use.

# changelog
changelogs:
Expand Down
3 changes: 2 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/init-bookstack-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ fi
# Check for app key
if [[ -z ${APP_KEY} ]]; then
if ! grep -qE "APP_KEY=[0-9A-Za-z:+\/=]{1,}" /app/www/.env 2> /dev/null || grep -qE "APP_KEY=SomeRandomString" /app/www/.env 2> /dev/null; then
echo "An application key is missing, halting init!"
echo "The application key is missing, halting init!"
echo "You can generate a key with: docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey"
echo "And apply it to the APP_KEY environment variable."
sleep infinity
fi
fi
Expand Down