mwalbeck
5f9124a283
All checks were successful
continuous-integration/drone/push Build is passing
Add shellcheck for linting entrypoint scripts. Add hadolint for linting Dockerfiles. Co-authored-by: Magnus Walbeck <magnus.walbeck@walbeck.it> Reviewed-on: #67 Co-Authored-By: mwalbeck <magnus.walbeck@walbeck.it> Co-Committed-By: mwalbeck <magnus.walbeck@walbeck.it>
26 lines
566 B
Bash
Executable File
26 lines
566 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
GRAV_FOLDER=${GRAV_FOLDER:-html}
|
|
|
|
mkdir -p /var/www/"$GRAV_FOLDER"
|
|
cd /var/www/"$GRAV_FOLDER"
|
|
|
|
rsync -rlD --delete \
|
|
--exclude /backup/ \
|
|
--exclude /logs/ \
|
|
--exclude /tmp/ \
|
|
--exclude /vendor/ \
|
|
--exclude /user/ \
|
|
/usr/share/grav/ /var/www/"$GRAV_FOLDER"
|
|
|
|
mkdir -p assets backup cache images logs tmp
|
|
|
|
bin/grav install
|
|
bin/grav clearcache
|
|
|
|
chown www-data /proc/self/fd/1 /proc/self/fd/2
|
|
chown -R --from=root:root www-data:www-data /var/www/"$GRAV_FOLDER"
|
|
|
|
exec gosu www-data "$@"
|