Skip to content

Commit 9a12c05

Browse files
authored
Merge pull request #28 from cw1998/feature/wkhtmltopdf
Add WKHTMLTOPDF for use in .env file if desired
2 parents a7bcdfb + accc7cb commit 9a12c05

File tree

5 files changed

+54
-20
lines changed

5 files changed

+54
-20
lines changed

Diff for: Dockerfile

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ FROM lsiobase/nginx:3.9
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6+
ARG BOOKSTACK_RELEASE
67
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
78
LABEL maintainer="homerr"
89

910
# package versions
1011
ARG BOOKSTACK_RELEASE
1112

1213
RUN \
13-
echo "**** install build packages ****" && \
14+
echo "**** install packages ****" && \
1415
apk add --no-cache \
1516
curl \
16-
tar \
17+
fontconfig \
1718
memcached \
1819
netcat-openbsd \
1920
php7-ctype \
@@ -29,15 +30,19 @@ RUN \
2930
php7-phar \
3031
php7-simplexml \
3132
php7-tidy \
32-
php7-tokenizer && \
33+
php7-tokenizer \
34+
qt5-qtbase \
35+
tar \
36+
ttf-freefont \
37+
wkhtmltopdf && \
3338
echo "**** configure php-fpm ****" && \
3439
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php7/php-fpm.d/www.conf && \
3540
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
3641
echo "**** fetch bookstack ****" && \
3742
mkdir -p\
3843
/var/www/html && \
3944
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
40-
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
45+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
4146
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
4247
fi && \
4348
curl -o \

Diff for: Dockerfile.aarch64

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ FROM lsiobase/nginx:arm64v8-3.9
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6+
ARG BOOKSTACK_RELEASE
67
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
78
LABEL maintainer="homerr"
89

910
# package versions
1011
ARG BOOKSTACK_RELEASE
1112

1213
RUN \
13-
echo "**** install build packages ****" && \
14+
echo "**** install packages ****" && \
1415
apk add --no-cache \
1516
curl \
16-
tar \
17+
fontconfig \
1718
memcached \
1819
netcat-openbsd \
1920
php7-ctype \
@@ -29,15 +30,19 @@ RUN \
2930
php7-phar \
3031
php7-simplexml \
3132
php7-tidy \
32-
php7-tokenizer && \
33+
php7-tokenizer \
34+
qt5-qtbase \
35+
tar \
36+
ttf-freefont \
37+
wkhtmltopdf && \
3338
echo "**** configure php-fpm ****" && \
3439
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php7/php-fpm.d/www.conf && \
3540
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
3641
echo "**** fetch bookstack ****" && \
3742
mkdir -p\
3843
/var/www/html && \
3944
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
40-
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
45+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
4146
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
4247
fi && \
4348
curl -o \

Diff for: Dockerfile.armhf

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ FROM lsiobase/nginx:arm32v7-3.9
33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6+
ARG BOOKSTACK_RELEASE
67
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
78
LABEL maintainer="homerr"
89

910
# package versions
1011
ARG BOOKSTACK_RELEASE
1112

1213
RUN \
13-
echo "**** install build packages ****" && \
14+
echo "**** install packages ****" && \
1415
apk add --no-cache \
1516
curl \
16-
tar \
17+
fontconfig \
1718
memcached \
1819
netcat-openbsd \
1920
php7-ctype \
@@ -29,15 +30,19 @@ RUN \
2930
php7-phar \
3031
php7-simplexml \
3132
php7-tidy \
32-
php7-tokenizer && \
33+
php7-tokenizer \
34+
qt5-qtbase \
35+
tar \
36+
ttf-freefont \
37+
wkhtmltopdf && \
3338
echo "**** configure php-fpm ****" && \
3439
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php7/php-fpm.d/www.conf && \
3540
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
3641
echo "**** fetch bookstack ****" && \
3742
mkdir -p\
3843
/var/www/html && \
3944
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
40-
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
45+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
4146
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
4247
fi && \
4348
curl -o \

Diff for: README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,26 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
144144
 
145145
## Application Setup
146146

147-
Default username is [email protected] with password of **password**, access the container at http://dockerhost:6875.
148147

149-
This application is dependent on an 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/.
148+
The default username is [email protected] with the password of **password**, access the container at http://dockerhost:6875.
149+
150+
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/.
151+
150152

151153
If you intend to use this application behind a subfolder reverse proxy, such as our LetsEncrypt container or Traefik you will need to make sure that the `APP_URL` environment variable is set, or it will not work
152154

153155
Documentation for BookStack can be found at https://www.bookstackapp.com/docs/
154156

155157
### Advanced Users (full control over the .env file)
156-
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.
158+
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, Memcache, LDAP and so on you will need to make your own .env file with guidance from the BookStack documentation.
159+
160+
161+
When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an .env file to /config/www/.env on your host system for you to edit. When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an exemplary .env file to /config/www/.env on your host system for you to edit.
162+
163+
#### PDF Rendering
164+
[wkhtmltopdf](https://wkhtmltopdf.org/) is available to use as an alternative PDF rendering generator as described at https://www.bookstackapp.com/docs/admin/pdf-rendering/.
157165

158-
When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an .env file to /config/www/.env on your host system for you to edit.
166+
The path to wkhtmltopdf in this image to include in your .env file is `/usr/bin/wkhtmltopdf`.
159167

160168

161169

@@ -220,6 +228,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
220228

221229
## Versions
222230

231+
* **14.06.19:** - Add wkhtmltopdf to image for PDF rendering.
223232
* **20.04.19:** - Rebase to Alpine 3.9, add MySQL init logic.
224233
* **22.03.19:** - Switching to new Base images, shift to arm32v7 tag.
225234
* **20.01.19:** - Added php7-curl

Diff for: readme-vars.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,31 @@ custom_compose: |
7777
# application setup block
7878
app_setup_block_enabled: true
7979
app_setup_block: |
80-
Default username is [email protected] with password of **password**, access the container at http://dockerhost:6875.
8180
82-
This application is dependent on an 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/.
81+
The default username is [email protected] with the password of **password**, access the container at http://dockerhost:6875.
8382
83+
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/.
84+
85+
8486
If you intend to use this application behind a subfolder reverse proxy, such as our LetsEncrypt container or Traefik you will need to make sure that the `APP_URL` environment variable is set, or it will not work
8587
8688
Documentation for BookStack can be found at https://www.bookstackapp.com/docs/
8789
8890
### Advanced Users (full control over the .env file)
89-
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.
91+
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, Memcache, LDAP and so on you will need to make your own .env file with guidance from the BookStack documentation.
92+
93+
94+
When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an .env file to /config/www/.env on your host system for you to edit. When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an exemplary .env file to /config/www/.env on your host system for you to edit.
95+
96+
#### PDF Rendering
97+
[wkhtmltopdf](https://wkhtmltopdf.org/) is available to use as an alternative PDF rendering generator as described at https://www.bookstackapp.com/docs/admin/pdf-rendering/.
98+
99+
The path to wkhtmltopdf in this image to include in your .env file is `/usr/bin/wkhtmltopdf`.
90100
91-
When you create the container, do not set any arguments for any SQL settings, or APP_URL. The container will copy an .env file to /config/www/.env on your host system for you to edit.
92101
93102
# changelog
94103
changelogs:
104+
- { date: "14.06.19:", desc: "Add wkhtmltopdf to image for PDF rendering." }
95105
- { date: "20.04.19:", desc: "Rebase to Alpine 3.9, add MySQL init logic." }
96106
- { date: "22.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
97107
- { date: "20.01.19:", desc: "Added php7-curl"}

0 commit comments

Comments
 (0)