generated from coop-cloud/example
fix: move config out of data dir
This commit is contained in:
@ -18,7 +18,8 @@ services:
|
||||
- SITE_THEME
|
||||
configs:
|
||||
- source: config_ini
|
||||
target: /data/config.ini
|
||||
# Can't put the config file in /data or else the volume mounts conflict
|
||||
target: /usr/share/writefreely/config.ini
|
||||
- source: writefreely_entrypoint
|
||||
target: /abra-entrypoint.sh
|
||||
mode: 0555
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Must match config mout point in compose.yml
|
||||
CONFIG=/usr/share/writefreely/config.ini
|
||||
SENTINEL=/data/abra_first_time_setup
|
||||
|
||||
if [ ! -f /data/abra_first_time_setup ]; then
|
||||
if [ ! -f $SENTINEL ]; then
|
||||
echo "Running first-time setup"
|
||||
/go/cmd/writefreely/writefreely --gen-keys
|
||||
/go/cmd/writefreely/writefreely db init
|
||||
touch /data/abra_first_time_setup
|
||||
/usr/bin/writefreely -c $CONFIG --gen-keys
|
||||
/usr/bin/writefreely -c $CONFIG db init
|
||||
touch $SENTINEL
|
||||
fi
|
||||
/go/cmd/writefreely/writefreely db migrate
|
||||
exec /go/cmd/writefreely/writefreely
|
||||
|
||||
/usr/bin/writefreely -c $CONFIG db migrate
|
||||
exec /usr/bin/writefreely -c $CONFIG
|
||||
|
||||
Reference in New Issue
Block a user