|
|
@ -1,10 +1,12 @@ |
|
|
|
#!/bin/sh |
|
|
|
|
|
|
|
# not exactly elegant, but one container is Debian, the other is Alpine |
|
|
|
useradd -MU leftypol |
|
|
|
addgroup leftypol |
|
|
|
adduser -DHG leftypol leftypol |
|
|
|
|
|
|
|
if [ "$1" == "php" ]; then |
|
|
|
useradd -MU leftypol |
|
|
|
else |
|
|
|
addgroup leftypol |
|
|
|
adduser -DHG leftypol leftypol |
|
|
|
fi |
|
|
|
set -eu |
|
|
|
|
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol |
|
|
@ -21,8 +23,8 @@ ln -s \ |
|
|
|
/code/install.sql \ |
|
|
|
/var/www-leftypol/ |
|
|
|
|
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www/js |
|
|
|
ln -s /code/js/* /var/www/js/ |
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/js |
|
|
|
ln -s /code/js/* /var/www-leftypol/js/ |
|
|
|
|
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/templates |
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/templates/cache |
|
|
@ -30,3 +32,9 @@ ln -s /code/templates/* /var/www-leftypol/templates/ |
|
|
|
|
|
|
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/inc |
|
|
|
ln -s /code/inc/* /var/www-leftypol/inc/ |
|
|
|
|
|
|
|
if [ "$1" = "php" ]; then |
|
|
|
ln -s /code/composer.json /code/composer.lock /var/www-leftypol/ \ |
|
|
|
cd /var/www |
|
|
|
composer install |
|
|
|
fi |
|
|
|