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 152145a

Browse filesBrowse files
committed
Remove .env file generation from entrypoint
1 parent cd66a5e commit 152145a
Copy full SHA for 152145a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-80
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-80
lines changed

‎docker-entrypoint.sh

Copy file name to clipboardExpand all lines: docker-entrypoint.sh
+2-80Lines changed: 2 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,86 +7,8 @@ echoerr() { echo "$@" 1>&2; }
77
IFS=":" read -r DB_HOST_NAME DB_PORT <<< "$DB_HOST"
88
DB_PORT=${DB_PORT:-3306}
99

10-
if [ ! -f ".env" ]; then
11-
if [[ "${DB_HOST}" ]]; then
12-
cat > ".env" <<EOF
13-
# Environment
14-
APP_ENV=production
15-
APP_DEBUG=${APP_DEBUG:-false}
16-
APP_KEY=${APP_KEY:-SomeRandomStringWith32Characters}
17-
18-
# The below url has to be set if using social auth options
19-
# or if you are not using BookStack at the root path of your domain.
20-
APP_URL=${APP_URL:-null}
21-
22-
# Database details
23-
DB_HOST=${DB_HOST:-localhost}
24-
DB_DATABASE=${DB_DATABASE:-bookstack}
25-
DB_USERNAME=${DB_USERNAME:-bookstack}
26-
DB_PASSWORD=${DB_PASSWORD:-password}
27-
28-
# Cache and session
29-
CACHE_DRIVER=file
30-
SESSION_DRIVER=file
31-
# If using Memcached, comment the above and uncomment these
32-
#CACHE_DRIVER=memcached
33-
#SESSION_DRIVER=memcached
34-
QUEUE_DRIVER=sync
35-
36-
# Memcached settings
37-
# If using a UNIX socket path for the host, set the port to 0
38-
# This follows the following format: HOST:PORT:WEIGHT
39-
# For multiple servers separate with a comma
40-
MEMCACHED_SERVERS=127.0.0.1:11211:100
41-
42-
# Storage
43-
STORAGE_TYPE=${STORAGE_TYPE:-local}
44-
# Amazon S3 Config
45-
STORAGE_S3_KEY=${STORAGE_S3_KEY:-false}
46-
STORAGE_S3_SECRET=${STORAGE_S3_SECRET:-false}
47-
STORAGE_S3_REGION=${STORAGE_S3_REGION:-false}
48-
STORAGE_S3_BUCKET=${STORAGE_S3_BUCKET:-false}
49-
# Storage URL
50-
# Used to prefix image urls for when using custom domains/cdns
51-
STORAGE_URL=${STORAGE_URL:-false}
52-
53-
# General auth
54-
AUTH_METHOD=${AUTH_METHOD:-standard}
55-
56-
# Social Authentication information. Defaults as off.
57-
GITHUB_APP_ID=${GITHUB_APP_ID:-false}
58-
GITHUB_APP_SECRET=${GITHUB_APP_SECRET:-false}
59-
GOOGLE_APP_ID=${GOOGLE_APP_ID:-false}
60-
GOOGLE_APP_SECRET=${GOOGLE_APP_SECRET:-false}
61-
62-
# External services such as Gravatar
63-
DISABLE_EXTERNAL_SERVICES=${DISABLE_EXTERNAL_SERVICES:-false}
64-
65-
# LDAP Settings
66-
LDAP_SERVER=${LDAP_SERVER:-false}
67-
LDAP_BASE_DN=${LDAP_BASE_DN:-false}
68-
LDAP_DN=${LDAP_DN:-false}
69-
LDAP_PASS=${LDAP_PASS:-false}
70-
LDAP_USER_FILTER=${LDAP_USER_FILTER:-false}
71-
LDAP_VERSION=${LDAP_VERSION:-false}
72-
LDAP_ID_ATTRIBUTE=${LDAP_ID_ATTRIBUTE:-false}
73-
LDAP_TLS_INSECURE=${LDAP_TLS_INSECURE:-false}
74-
LDAP_DISPLAY_NAME_ATTRIBUTE=${LDAP_DISPLAY_NAME_ATTRIBUTE:-false}
75-
76-
# Mail settings
77-
MAIL_DRIVER=${MAIL_DRIVER:-smtp}
78-
MAIL_HOST=${MAIL_HOST:-localhost}
79-
MAIL_PORT=${MAIL_PORT:-1025}
80-
MAIL_USERNAME=${MAIL_USERNAME:-null}
81-
MAIL_PASSWORD=${MAIL_PASSWORD:-null}
82-
MAIL_ENCRYPTION=${MAIL_ENCRYPTION:-null}
83-
# URL used for social login redirects, NO TRAILING SLASH
84-
EOF
85-
else
86-
echo >&2 'error: missing DB_HOST environment variable'
87-
exit 1
88-
fi
89-
fi
10+
# Ensure these is no local .env file
11+
[ -f ".env" ] && rm .env
9012

9113
echoerr "wait-for-db: waiting for ${DB_HOST_NAME}:${DB_PORT}"
9214

0 commit comments

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