-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from solidnerd/rjh_general
Update and generally tidy the README
- Loading branch information
Showing
1 changed file
with
76 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,125 @@ | ||
## Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) | ||
# Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) | ||
|
||
[](https://travis-ci.org/solidnerd/docker-bookstack) [](https://microbadger.com/images/solidnerd/bookstack "Get your own image badge on microbadger.com") [](https://microbadger.com/images/solidnerd/bookstack "Get your own commit badge on microbadger.com") [](https://microbadger.com/images/solidnerd/bookstack "Get your own version badge on microbadger.com") [](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 '[email protected]' and password 'password'. | ||
and after that open your Browser and go to | ||
[http://localhost:8080](http://localhost:8080) . You can login with username | ||
`[email protected]` 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 `<HOST>` 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 `<HOST>` in the following line to your host directory and add it then to | ||
your run command: | ||
|
||
```bash | ||
--mount type=bind,source=<HOST>/.env,target=/var/www/bookstack/.env \ | ||
-v <HOST>:/var/www/bookstack/public/uploads \ | ||
-v <HOST>:/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 '[email protected]' 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 `[email protected]` 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. |