You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- { env_var: "DB_DATABASE", env_value: "bookstackapp", desc: "for specifying the database to be used" }
32
32
- { env_var: "APPURL", env_value: "your.site.here.xyz", desc: "for specifying the url your application will be accessed on "}
33
+
- { env_var: "ADVANCED_MODE", env_value: "1", desc: "enables advanced mode for direct editing of the .env - scroll down for details on this"}
33
34
34
35
param_usage_include_ports: true
35
36
param_ports:
@@ -62,7 +63,19 @@ app_setup_block: |
62
63
63
64
Documentation can be found at https://www.bookstackapp.com/docs/
64
65
66
+
### Advanced Mode
67
+
We have implemented a special 'advanced mode' where users who wish to leverage the built in SMTP or LDAP functionality, will have the ability to edit the .env by hand. With `ADVANCED_MODE=1` set when
68
+
the container is created, it will copy the .env.example to /config within the container. You can then edit this file on the host system (make sure you read the BookStack docs) and restart the
69
+
container when finished. When the container starts, it copies /config/.env to /var/www/html/.env within the container for the web app to use. It will do this every time the container restarts.
70
+
71
+
Note, the APP_KEY is still set by PHP environment so you do not need to worrry about this.
72
+
73
+
### Composer
74
+
75
+
Some simple docker-compose files are included for you to get started with. You will still need to manually configure the SQL server, but the compose files will get the stack running for you.
76
+
65
77
# changelog
66
78
changelogs:
79
+
- { date: "08.10.18:", desc: "Advanced mode, symlink changes, sed fixing, docs updated, added some composer files"}
Copy file name to clipboardExpand all lines: root/etc/cont-init.d/50-config
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# create directory structure
4
4
mkdir -p \
5
-
/config/www/{files,images,uploads,logs}
5
+
/config/www/{storage,public}
6
6
7
7
# create symlinks
8
8
symlinks=( \
@@ -21,7 +21,7 @@ done
21
21
# If not set, runs in basic mode where .example.env is copied to /var/www/html/.env and seds are applied to set documented variables
22
22
if [ "$ADVANCED_MODE" == 1 ];
23
23
then
24
-
echo "Advanced Mode Enabled - Syncing .env from /config to /var/www/html"
24
+
echo "Advanced Mode Enabled - Syncing .env from /config to /var/www/html - if you're doing this you better read the BookStack documentation. Restart container after making changes to .env"
25
25
[[ ! -f "/config/.env" ]] && \
26
26
cp /var/www/html/.env.example /config/.env
27
27
cp /config/.env /var/www/html/.env
@@ -35,7 +35,9 @@ elif [ -z "$ADVANCED_MODE" ];
35
35
sed -i "s/DB_DATABASE=database_database/DB_DATABASE=${DB_DATABASE}/g" /var/www/html/.env
36
36
sed -i "s/DB_USERNAME=database_username/DB_USERNAME=${DB_USER}/g" /var/www/html/.env
37
37
sed -i "s/DB_PASSWORD=database_user_password/DB_PASSWORD=${DB_PASS}/g" /var/www/html/.env
38
-
sed -i "s/# APP_URL=http://bookstack.dev/APP_URL=${APP_URL}/g" /var/www/html/.env
38
+
elif [ "$APP_URL" ]
39
+
echo "App URL Set"
40
+
sed -i "s,#\sAPP_URL.*,APP_URL=${APP_URL},g" /var/www/html/.env
39
41
else
40
42
echo "Nothing to do with .env - what did you do homer?"
0 commit comments