Pőcze Bence
0c2334502d
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
32 lines
619 B
Bash
Executable File
32 lines
619 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "Migrating DB..."
|
|
./rvr db:migrate
|
|
|
|
echo "Installing crontab..."
|
|
/usr/bin/crontab docker/scripts/cron
|
|
|
|
echo "Set runner user based on owner of .env..."
|
|
if ! getent group rvr; then
|
|
USER_GID=$(stat -c "%g" .env)
|
|
groupadd --gid $USER_GID rvr
|
|
fi
|
|
if ! id -u rvr; then
|
|
USER_UID=$(stat -c "%u" .env)
|
|
useradd --uid $USER_UID --gid $USER_GID rvr
|
|
fi
|
|
chown -R rvr:rvr cache
|
|
sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/8.1/fpm/pool.d/www.conf
|
|
|
|
set +e
|
|
|
|
/usr/sbin/cron -f &
|
|
/usr/sbin/php-fpm8.1 -F &
|
|
/usr/sbin/nginx -g 'daemon off;' &
|
|
|
|
wait -n
|
|
|
|
exit $?
|