|
1 |
| -## Docker Image For [BookStack](https://github.com/ssddanbrown/BookStack) |
| 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 | + |
| 4 | + |
| 5 | + |
4 | 6 |
|
5 |
| -## Current Version: [23.6.1](https://github.com/SolidNerd/docker-bookstack/blob/master/Dockerfile) |
6 |
| - |
7 |
| -### Changes |
| 7 | +## Changes |
8 | 8 |
|
9 | 9 | The version 23.6.0 is broken due to a bad `.env` configuration created by the
|
10 | 10 | entrypoint script. This is fixed in version 23.6.1.
|
11 | 11 |
|
12 |
| -In 0.28.0 we changed the container http port from 80 to 8080 to allow root privileges to be dropped |
| 12 | +In 0.28.0 we changed the container http port from 80 to 8080 to allow root |
| 13 | +privileges to be dropped |
13 | 14 |
|
14 |
| -In 0.12.2 we removed `DB_PORT` . You can now specify the port via `DB_HOST` like `DB_HOST=mysql:3306` |
| 15 | +In 0.12.2 we removed `DB_PORT` . You can now specify the port via `DB_HOST` like |
| 16 | +`DB_HOST=mysql:3306` |
15 | 17 |
|
16 |
| -### Quickstart |
| 18 | +## Quickstart |
17 | 19 |
|
18 | 20 | With Docker Compose is a Quickstart very easy. Run the following command:
|
19 | 21 |
|
20 |
| -``` |
| 22 | +```bash |
21 | 23 | docker-compose up
|
22 | 24 | ```
|
23 | 25 |
|
24 |
| -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'. |
| 26 | +and after that open your Browser and go to |
| 27 | +[http://localhost:8080](http://localhost:8080) . You can login with username |
| 28 | +`[email protected]` and password `password`. |
25 | 29 |
|
26 |
| -### Issues |
| 30 | +## Issues |
27 | 31 |
|
28 | 32 | If you have any issues feel free to create an [issue on GitHub](https://github.com/solidnerd/docker-bookstack/issues).
|
29 | 33 |
|
30 |
| - |
31 |
| -### How to use the Image without Docker compose |
| 34 | +## How to use the Image without Docker compose |
32 | 35 |
|
33 | 36 | Note that if you want to use LDAP, `$` has to be escape like `\$`, i.e. `-e "LDAP_USER_FILTER"="(&(uid=\${user}))"`
|
34 | 37 |
|
35 | 38 | Networking changed in Docker v1.9, so you need to do one of the following steps.
|
36 | 39 |
|
37 |
| -#### Docker < v1.9 |
| 40 | +### Docker < v1.9 |
38 | 41 |
|
39 | 42 | 1. MySQL Container:
|
40 | 43 |
|
41 |
| -```bash |
42 |
| -docker run -d \ |
43 |
| --p 3306:3306 \ |
44 |
| --e MYSQL_ROOT_PASSWORD=secret \ |
45 |
| --e MYSQL_DATABASE=bookstack \ |
46 |
| --e MYSQL_USER=bookstack \ |
47 |
| --e MYSQL_PASSWORD=secret \ |
48 |
| ---name bookstack_db \ |
49 |
| -mysql:5.7.21 |
50 |
| -``` |
| 44 | + ```bash |
| 45 | + docker run -d \ |
| 46 | + -p 3306:3306 \ |
| 47 | + -e MYSQL_ROOT_PASSWORD=secret \ |
| 48 | + -e MYSQL_DATABASE=bookstack \ |
| 49 | + -e MYSQL_USER=bookstack \ |
| 50 | + -e MYSQL_PASSWORD=secret \ |
| 51 | + --name bookstack_db \ |
| 52 | + mysql:5.7.21 |
| 53 | + ``` |
| 54 | + |
51 | 55 | 2. BookStack Container:
|
52 | 56 |
|
53 |
| -```bash |
54 |
| -docker run -d --link bookstack_db_:mysql \ |
55 |
| --p 8080:8080 \ |
56 |
| ---name bookstack_23.6.1 \ |
57 |
| -solidnerd/bookstack:23.6.1 |
58 |
| -``` |
| 57 | + ```bash |
| 58 | + docker run -d --link bookstack_db_:mysql \ |
| 59 | + -p 8080:8080 \ |
| 60 | + --name bookstack_23.6.1 \ |
| 61 | + solidnerd/bookstack:23.6.1 |
| 62 | + ``` |
59 | 63 |
|
60 |
| -#### Docker 1.9+ |
| 64 | +### Docker 1.9+ |
61 | 65 |
|
62 | 66 | 1. Create a shared network:
|
63 | 67 |
|
64 |
| -```bash |
65 |
| -docker network create bookstack_nw |
66 |
| -``` |
| 68 | + ```bash |
| 69 | + docker network create bookstack_nw |
| 70 | + ``` |
67 | 71 |
|
68 | 72 | 2. Run MySQL container :
|
69 | 73 |
|
70 |
| -```bash |
71 |
| -docker run -d --net bookstack_nw \ |
72 |
| --e MYSQL_ROOT_PASSWORD=secret \ |
73 |
| --e MYSQL_DATABASE=bookstack \ |
74 |
| --e MYSQL_USER=bookstack \ |
75 |
| --e MYSQL_PASSWORD=secret \ |
76 |
| - --name="bookstack_db" \ |
77 |
| - mysql:5.7.21 |
78 |
| -``` |
| 74 | + ```bash |
| 75 | + docker run -d --net bookstack_nw \ |
| 76 | + -e MYSQL_ROOT_PASSWORD=secret \ |
| 77 | + -e MYSQL_DATABASE=bookstack \ |
| 78 | + -e MYSQL_USER=bookstack \ |
| 79 | + -e MYSQL_PASSWORD=secret \ |
| 80 | + --name="bookstack_db" \ |
| 81 | + mysql:5.7.21 |
| 82 | + ``` |
79 | 83 |
|
80 | 84 | 3. Run BookStack Container
|
81 | 85 |
|
82 |
| -```bash |
83 |
| -docker run -d --net bookstack_nw \ |
84 |
| --e DB_HOST=bookstack_db:3306 \ |
85 |
| --e DB_DATABASE=bookstack \ |
86 |
| --e DB_USERNAME=bookstack \ |
87 |
| --e DB_PASSWORD=secret \ |
88 |
| --e APP_URL=http://example.com \ |
89 |
| --p 8080:8080 \ |
90 |
| ---name="bookstack_23.6.1" \ |
91 |
| - solidnerd/bookstack:23.6.1 |
92 |
| -``` |
| 86 | + ```bash |
| 87 | + docker run -d --net bookstack_nw \ |
| 88 | + -e DB_HOST=bookstack_db:3306 \ |
| 89 | + -e DB_DATABASE=bookstack \ |
| 90 | + -e DB_USERNAME=bookstack \ |
| 91 | + -e DB_PASSWORD=secret \ |
| 92 | + -e APP_URL=http://example.com \ |
| 93 | + -p 8080:8080 \ |
| 94 | + --name="bookstack_23.6.1" \ |
| 95 | + solidnerd/bookstack:23.6.1 |
| 96 | + ``` |
| 97 | + |
| 98 | + The APP_URL parameter should be the base URL for your BookStack instance without |
| 99 | + a trailing slash. For example: |
93 | 100 |
|
94 |
| -The APP_URL parameter should be the base URL for your BookStack instance without a trailing slash. For example: |
95 |
| -APP_URL=http://example.com |
| 101 | + `APP_URL=http://example.com` |
96 | 102 |
|
97 |
| -#### Volumes |
98 |
| -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: |
| 103 | +### Volumes |
| 104 | + |
| 105 | +To access your `.env` file and important bookstack folders on your host system |
| 106 | +change `<HOST>` in the following line to your host directory and add it then to |
| 107 | +your run command: |
99 | 108 |
|
100 | 109 | ```bash
|
101 | 110 | --mount type=bind,source=<HOST>/.env,target=/var/www/bookstack/.env \
|
102 | 111 | -v <HOST>:/var/www/bookstack/public/uploads \
|
103 | 112 | -v <HOST>:/var/www/bookstack/storage/uploads
|
104 | 113 | ```
|
105 |
| -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. |
106 | 114 |
|
107 |
| -After these steps you can visit [http://localhost:8080](http://localhost:8080) . You can login with username ' [email protected]' and password 'password'. |
| 115 | +In case of a windows host machine the .env file has to be already created in the |
| 116 | +host directory otherwise a folder named .env will be created. |
| 117 | + |
| 118 | +After these steps you can visit [http://localhost:8080](http://localhost:8080) . |
| 119 | +You can login with username `[email protected]` and password `password`. |
108 | 120 |
|
109 |
| -### Inspiration |
| 121 | +## Inspiration |
110 | 122 |
|
111 |
| -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. |
| 123 | +This is a fork of |
| 124 | +[Kilhog/docker-bookstack](https://github.com/Kilhog/docker-bookstack). Kilhog |
| 125 | +did the intial work, but I want to go in a different direction. |
0 commit comments