Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c2499c3

Browse filesBrowse files
authored
Merge pull request solidnerd#6 from dionysiusmarquis/master
2 parents 91f3b9f + 90b3f72 commit c2499c3
Copy full SHA for c2499c3

File tree

Expand file treeCollapse file tree

2 files changed

+43
-17
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+43
-17
lines changed

‎Dockerfile

Copy file name to clipboardExpand all lines: Dockerfile
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ FROM php:7.0-apache
33
ENV BOOKSTACK=BookStack \
44
BOOKSTACK_VERSION=0.12.1
55

6-
RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev wget \
6+
RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev wget libldap2-dev \
77
&& docker-php-ext-install pdo pdo_mysql mbstring zip \
8+
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
9+
&& docker-php-ext-install ldap \
810
&& docker-php-ext-configure gd --with-freetype-dir=usr/include/ --with-jpeg-dir=/usr/include/ \
911
&& docker-php-ext-install gd \
1012
&& cd /var/www && curl -sS https://getcomposer.org/installer | php \

‎docker-entrypoint.sh

Copy file name to clipboardExpand all lines: docker-entrypoint.sh
+40-16Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ if [ ! -f '/var/www/BookStack/.env' ]; then
88
cat > /var/www/BookStack/.env <<EOF
99
# Environment
1010
APP_ENV=production
11-
APP_DEBUG=false
12-
APP_KEY=SomeRandomString
11+
APP_DEBUG=${APP_DEBUG:-false}
12+
APP_KEY=${APP_KEY:-SomeRandomString}
13+
14+
# The below url has to be set if using social auth options
15+
# or if you are not using BookStack at the root path of your domain.
16+
APP_URL=${APP_URL:-null}
1317
1418
# Database details
1519
DB_HOST=${DB_HOST:-localhost}
20+
DB_PORT=${DB_PORT:-3306}
1621
DB_DATABASE=${DB_DATABASE:-bookstack}
1722
DB_USERNAME=${DB_USERNAME:-bookstack}
1823
DB_PASSWORD=${DB_PASSWORD:-password}
@@ -32,24 +37,43 @@ if [ ! -f '/var/www/BookStack/.env' ]; then
3237
MEMCACHED_SERVERS=127.0.0.1:11211:100
3338
3439
# Storage
35-
STORAGE_TYPE=local
40+
STORAGE_TYPE=${STORAGE_TYPE:-local}
3641
# Amazon S3 Config
37-
STORAGE_S3_KEY=false
38-
STORAGE_S3_SECRET=false
39-
STORAGE_S3_REGION=false
40-
STORAGE_S3_BUCKET=false
42+
STORAGE_S3_KEY=${STORAGE_S3_KEY:-false}
43+
STORAGE_S3_SECRET=${STORAGE_S3_SECRET:-false}
44+
STORAGE_S3_REGION=${STORAGE_S3_REGION:-false}
45+
STORAGE_S3_BUCKET=${STORAGE_S3_BUCKET:-false}
4146
# Storage URL
4247
# Used to prefix image urls for when using custom domains/cdns
43-
STORAGE_URL=false
48+
STORAGE_URL=${STORAGE_URL:-false}
4449
4550
# General auth
46-
AUTH_METHOD=standard
51+
AUTH_METHOD=${AUTH_METHOD:-standard}
4752
4853
# Social Authentication information. Defaults as off.
49-
GITHUB_APP_ID=false
50-
GITHUB_APP_SECRET=false
51-
GOOGLE_APP_ID=false
52-
GOOGLE_APP_SECRET=false
54+
GITHUB_APP_ID=${GITHUB_APP_ID:-false}
55+
GITHUB_APP_SECRET=${GITHUB_APP_SECRET:-false}
56+
GOOGLE_APP_ID=${GOOGLE_APP_ID:-false}
57+
GOOGLE_APP_SECRET=${GOOGLE_APP_SECRET:-false}
58+
59+
# External services such as Gravatar
60+
DISABLE_EXTERNAL_SERVICES=${DISABLE_EXTERNAL_SERVICES:-false}
61+
62+
# LDAP Settings
63+
LDAP_SERVER=${LDAP_SERVER:-false}
64+
LDAP_BASE_DN=${LDAP_BASE_DN:-false}
65+
LDAP_DN=${LDAP_DN:-false}
66+
LDAP_PASS=${LDAP_PASS:-false}
67+
LDAP_USER_FILTER=${LDAP_USER_FILTER:-false}
68+
LDAP_VERSION=${LDAP_VERSION:-false}
69+
70+
# Mail settings
71+
MAIL_DRIVER=${MAIL_DRIVER:-smtp}
72+
MAIL_HOST=${MAIL_HOST:-localhost}
73+
MAIL_PORT=${MAIL_PORT:-1025}
74+
MAIL_USERNAME=${MAIL_USERNAME:-null}
75+
MAIL_PASSWORD=${MAIL_PASSWORD:-null}
76+
MAIL_ENCRYPTION=${MAIL_ENCRYPTION:-null}
5377
# URL used for social login redirects, NO TRAILING SLASH
5478
EOF
5579
else
@@ -59,10 +83,10 @@ EOF
5983
fi
6084
fi
6185

62-
echoerr wait-for-db: waiting for ${DB_HOST}:3306
86+
echoerr wait-for-db: waiting for ${DB_HOST}:${DB_PORT}
6387

6488
timeout 15 bash <<EOT
65-
while ! (echo > /dev/tcp/${DB_HOST}/3306) >/dev/null 2>&1;
89+
while ! (echo > /dev/tcp/${DB_HOST}/${DB_PORT}) >/dev/null 2>&1;
6690
do sleep 1;
6791
done;
6892
EOT
@@ -73,7 +97,7 @@ if [ $RESULT -eq 0 ]; then
7397
sleep 1
7498
echoerr wait-for-db: done
7599
else
76-
echoerr wait-for-db: timeout out after 15 seconds waiting for ${DB_HOST}:3306
100+
echoerr wait-for-db: timeout out after 15 seconds waiting for ${DB_HOST}:${DB_PORT}
77101
fi
78102

79103
cd /var/www/BookStack/ && php artisan key:generate && php artisan migrate --force

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.