From 8149e1ff00596be591725b5add5b2e00ed3a1d54 Mon Sep 17 00:00:00 2001 From: Rick Henry Date: Wed, 5 Jul 2023 18:35:28 +0100 Subject: [PATCH 1/2] (Mostly) lint README with Markdownlint --- README.md | 132 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 73 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 4ca5ac13..fdf2dafd 100644 --- a/README.md +++ b/README.md @@ -1,111 +1,125 @@ -## Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) +# Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) [![Build Status](https://travis-ci.org/solidnerd/docker-bookstack.svg?branch=master)](https://travis-ci.org/solidnerd/docker-bookstack) [![](https://images.microbadger.com/badges/image/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/commit/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own commit badge on microbadger.com") [![](https://images.microbadger.com/badges/version/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/license/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own license badge on microbadger.com") ## Current Version: [23.6.1](https://github.com/SolidNerd/docker-bookstack/blob/master/Dockerfile) -### Changes +## Changes The version 23.6.0 is broken due to a bad `.env` configuration created by the entrypoint script. This is fixed in version 23.6.1. -In 0.28.0 we changed the container http port from 80 to 8080 to allow root privileges to be dropped +In 0.28.0 we changed the container http port from 80 to 8080 to allow root +privileges to be dropped -In 0.12.2 we removed `DB_PORT` . You can now specify the port via `DB_HOST` like `DB_HOST=mysql:3306` +In 0.12.2 we removed `DB_PORT` . You can now specify the port via `DB_HOST` like +`DB_HOST=mysql:3306` -### Quickstart +## Quickstart With Docker Compose is a Quickstart very easy. Run the following command: -``` +```bash docker-compose up ``` -and after that open your Browser and go to [http://localhost:8080](http://localhost:8080) . You can login with username 'admin@admin.com' and password 'password'. +and after that open your Browser and go to +[http://localhost:8080](http://localhost:8080) . You can login with username +`admin@admin.com` and password `password`. -### Issues +## Issues If you have any issues feel free to create an [issue on GitHub](https://github.com/solidnerd/docker-bookstack/issues). - -### How to use the Image without Docker compose +## How to use the Image without Docker compose Note that if you want to use LDAP, `$` has to be escape like `\$`, i.e. `-e "LDAP_USER_FILTER"="(&(uid=\${user}))"` Networking changed in Docker v1.9, so you need to do one of the following steps. -#### Docker < v1.9 +### Docker < v1.9 1. MySQL Container: -```bash -docker run -d \ --p 3306:3306 \ --e MYSQL_ROOT_PASSWORD=secret \ --e MYSQL_DATABASE=bookstack \ --e MYSQL_USER=bookstack \ --e MYSQL_PASSWORD=secret \ ---name bookstack_db \ -mysql:5.7.21 -``` + ```bash + docker run -d \ + -p 3306:3306 \ + -e MYSQL_ROOT_PASSWORD=secret \ + -e MYSQL_DATABASE=bookstack \ + -e MYSQL_USER=bookstack \ + -e MYSQL_PASSWORD=secret \ + --name bookstack_db \ + mysql:5.7.21 + ``` + 2. BookStack Container: -```bash -docker run -d --link bookstack_db_:mysql \ --p 8080:8080 \ ---name bookstack_23.6.1 \ -solidnerd/bookstack:23.6.1 -``` + ```bash + docker run -d --link bookstack_db_:mysql \ + -p 8080:8080 \ + --name bookstack_23.6.1 \ + solidnerd/bookstack:23.6.1 + ``` -#### Docker 1.9+ +### Docker 1.9+ 1. Create a shared network: -```bash -docker network create bookstack_nw -``` + ```bash + docker network create bookstack_nw + ``` 2. Run MySQL container : -```bash -docker run -d --net bookstack_nw \ --e MYSQL_ROOT_PASSWORD=secret \ --e MYSQL_DATABASE=bookstack \ --e MYSQL_USER=bookstack \ --e MYSQL_PASSWORD=secret \ - --name="bookstack_db" \ - mysql:5.7.21 -``` + ```bash + docker run -d --net bookstack_nw \ + -e MYSQL_ROOT_PASSWORD=secret \ + -e MYSQL_DATABASE=bookstack \ + -e MYSQL_USER=bookstack \ + -e MYSQL_PASSWORD=secret \ + --name="bookstack_db" \ + mysql:5.7.21 + ``` 3. Run BookStack Container -```bash -docker run -d --net bookstack_nw \ --e DB_HOST=bookstack_db:3306 \ --e DB_DATABASE=bookstack \ --e DB_USERNAME=bookstack \ --e DB_PASSWORD=secret \ --e APP_URL=http://example.com \ --p 8080:8080 \ ---name="bookstack_23.6.1" \ - solidnerd/bookstack:23.6.1 -``` + ```bash + docker run -d --net bookstack_nw \ + -e DB_HOST=bookstack_db:3306 \ + -e DB_DATABASE=bookstack \ + -e DB_USERNAME=bookstack \ + -e DB_PASSWORD=secret \ + -e APP_URL=http://example.com \ + -p 8080:8080 \ + --name="bookstack_23.6.1" \ + solidnerd/bookstack:23.6.1 + ``` + + The APP_URL parameter should be the base URL for your BookStack instance without + a trailing slash. For example: -The APP_URL parameter should be the base URL for your BookStack instance without a trailing slash. For example: -APP_URL=http://example.com + `APP_URL=http://example.com` -#### Volumes -To access your `.env` file and important bookstack folders on your host system change `` in the following line to your host directory and add it then to your run command: +### Volumes + +To access your `.env` file and important bookstack folders on your host system +change `` in the following line to your host directory and add it then to +your run command: ```bash --mount type=bind,source=/.env,target=/var/www/bookstack/.env \ -v :/var/www/bookstack/public/uploads \ -v :/var/www/bookstack/storage/uploads ``` -In case of a windows host machine the .env file has to be already created in the host directory otherwise a folder named .env will be created. -After these steps you can visit [http://localhost:8080](http://localhost:8080) . You can login with username 'admin@admin.com' and password 'password'. +In case of a windows host machine the .env file has to be already created in the +host directory otherwise a folder named .env will be created. + +After these steps you can visit [http://localhost:8080](http://localhost:8080) . +You can login with username `admin@admin.com` and password `password`. -### Inspiration +## Inspiration -This is a fork of [Kilhog/docker-bookstack](https://github.com/Kilhog/docker-bookstack). Kilhog did the intial work, but I want to go in a different direction. +This is a fork of +[Kilhog/docker-bookstack](https://github.com/Kilhog/docker-bookstack). Kilhog +did the intial work, but I want to go in a different direction. From 5e3a221758d7e193d3c1a4aea38cf9c81ca706bb Mon Sep 17 00:00:00 2001 From: Rick Henry Date: Wed, 5 Jul 2023 18:48:44 +0100 Subject: [PATCH 2/2] Replace Travis CI badge with Shields.io --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fdf2dafd..6ce4138c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) -[![Build Status](https://travis-ci.org/solidnerd/docker-bookstack.svg?branch=master)](https://travis-ci.org/solidnerd/docker-bookstack) [![](https://images.microbadger.com/badges/image/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/commit/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own commit badge on microbadger.com") [![](https://images.microbadger.com/badges/version/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/license/solidnerd/bookstack.svg)](https://microbadger.com/images/solidnerd/bookstack "Get your own license badge on microbadger.com") - -## Current Version: [23.6.1](https://github.com/SolidNerd/docker-bookstack/blob/master/Dockerfile) +![Build Status](https://img.shields.io/github/actions/workflow/status/solidnerd/docker-bookstack/master.yml) +![Latest release](https://img.shields.io/github/v/tag/solidnerd/docker-bookstack?label=Latest%20release) +![GitHub contributors](https://img.shields.io/github/contributors/solidnerd/docker-bookstack) ## Changes