Added Core repo files
This commit is contained in:
parent
a61b98a0f5
commit
044e4c87d9
8 changed files with 117 additions and 7 deletions
28
docker-entrypoint.sh
Normal file
28
docker-entrypoint.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
set -e;
|
||||
|
||||
data_init=/app/data_init
|
||||
data=/app/data
|
||||
|
||||
# populate /app/data if empty
|
||||
for i in $(ls $data_init)
|
||||
do
|
||||
if [ ! -e "$data/$i" ]; then
|
||||
[ -f "$data_init/$i" ] && cp "$data_init/$i" "$data/$i"
|
||||
[ -d "$data_init/$i" ] && cp -r "$data_init/$i" "$data/$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# creds.yml migration
|
||||
if [ -f /app/creds.yml ]; then
|
||||
echo "Default location for creds.yml is now /app/data/creds.yml."
|
||||
echo "Please move your creds.yml and update your docker-compose.yml accordingly."
|
||||
|
||||
export Ellie_creds=/app/creds.yml
|
||||
fi
|
||||
|
||||
# ensure ellie can write on /app/data
|
||||
chown -R ellie:ellie "$data"
|
||||
|
||||
# drop to regular user and launch command
|
||||
exec sudo -u ellie "$@"
|
Loading…
Add table
Add a link
Reference in a new issue