|
1 | 1 | ## Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack)
|
2 | 2 |
|
3 |
| -[](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") |
| 3 | +This fork mainly focus to host multiple BookStack Instances on K8s in subdirectories (wiki.example.com/wiki1, wiki.example.com/wiki2, ...) without root privileges |
4 | 4 |
|
5 |
| -## Current Version: [0.31.6](https://github.com/SolidNerd/docker-bookstack/blob/master/Dockerfile) |
| 5 | +## Current Version: [21.04.5] |
6 | 6 |
|
7 | 7 | ### Changes
|
8 | 8 |
|
9 |
| -In 0.28.0 we changed the container http port from 80 to 8080 to allow root privileges to be dropped |
10 |
| -In 0.12.2 we removed `DB_PORT` . You can now specify the port via `DB_HOST` like `DB_HOST=mysql:3306` |
11 |
| - |
12 |
| -### Quickstart |
13 |
| - |
14 |
| -With Docker Compose is a Quickstart very easy. Run the following command: |
15 |
| - |
16 |
| -``` |
17 |
| -docker-compose up |
18 |
| -``` |
19 |
| - |
20 |
| -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'. |
21 |
| - |
22 |
| -### Issues |
23 |
| - |
24 |
| -If you have any issues feel free to create an [issue on GitHub](https://github.com/solidnerd/docker-bookstack/issues). |
25 |
| - |
26 |
| - |
27 |
| -### How to use the Image without Docker compose |
28 |
| - |
29 |
| -Note that if you want to use LDAP, `$` has to be escape like `\$`, i.e. `-e "LDAP_USER_FILTER"="(&(uid=\${user}))"` |
30 |
| - |
31 |
| -Networking changed in Docker v1.9, so you need to do one of the following steps. |
32 |
| - |
33 |
| -#### Docker < v1.9 |
34 |
| - |
35 |
| -1. MySQL Container: |
36 |
| - |
37 |
| -```bash |
38 |
| -docker run -d \ |
39 |
| --p 3306:3306 \ |
40 |
| --e MYSQL_ROOT_PASSWORD=secret \ |
41 |
| --e MYSQL_DATABASE=bookstack \ |
42 |
| --e MYSQL_USER=bookstack \ |
43 |
| --e MYSQL_PASSWORD=secret \ |
44 |
| ---name bookstack_db \ |
45 |
| -mysql:5.7.21 |
46 |
| -``` |
47 |
| -2. BookStack Container: |
48 |
| - |
49 |
| -```bash |
50 |
| -docker run -d --link bookstack_db_:mysql \ |
51 |
| --p 8080:8080 \ |
52 |
| ---name bookstack_0.31.6 \ |
53 |
| -solidnerd/bookstack:0.31.6 |
54 |
| -``` |
55 |
| - |
56 |
| -#### Docker 1.9+ |
57 |
| - |
58 |
| -1. Create a shared network: |
59 |
| - |
60 |
| -```bash |
61 |
| -docker network create bookstack_nw |
62 |
| -``` |
63 |
| - |
64 |
| -2. Run MySQL container : |
65 |
| - |
66 |
| -```bash |
67 |
| -docker run -d --net bookstack_nw \ |
68 |
| --e MYSQL_ROOT_PASSWORD=secret \ |
69 |
| --e MYSQL_DATABASE=bookstack \ |
70 |
| --e MYSQL_USER=bookstack \ |
71 |
| --e MYSQL_PASSWORD=secret \ |
72 |
| - --name="bookstack_db" \ |
73 |
| - mysql:5.7.21 |
74 |
| -``` |
75 |
| - |
76 |
| -3. Run BookStack Container |
77 |
| - |
78 |
| -```bash |
79 |
| -docker run -d --net bookstack_nw \ |
80 |
| --e DB_HOST=bookstack_db:3306 \ |
81 |
| --e DB_DATABASE=bookstack \ |
82 |
| --e DB_USERNAME=bookstack \ |
83 |
| --e DB_PASSWORD=secret \ |
84 |
| --p 8080:8080 \ |
85 |
| ---name="bookstack_0.31.6" \ |
86 |
| - solidnerd/bookstack:0.31.6 |
87 |
| -``` |
88 |
| - |
89 |
| -#### Volumes |
90 |
| -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: |
91 |
| - |
92 |
| -```bash |
93 |
| ---mount type=bind,source=<HOST>/.env,target=/var/www/bookstack/.env \ |
94 |
| --v <HOST>:/var/www/bookstack/public/uploads \ |
95 |
| --v <HOST>:/var/www/bookstack/storage/uploads |
96 |
| -``` |
97 |
| -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. |
98 |
| - |
99 |
| -After these steps you can visit [http://localhost:8080](http://localhost:8080) . You can login with username ' [email protected]' and password 'password'. |
| 9 | +Update to bookstack 21.04.5, added more environement variables (mainly for SAML auth) and mainly focus to host on K8s with subdirectory bookstack install (=> Multiple BookStack Instances with Ingress) |
100 | 10 |
|
101 | 11 | ### Inspiration
|
102 | 12 |
|
103 |
| -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. |
| 13 | +This is a fork of [solidnerd/docker-bookstack](https://github.com/solidnerd/docker-bookstack). |
0 commit comments