2023-09-28 10:02:00 +02:00
|
|
|
#!/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..."
|
|
|
|
USER_UID=$(stat -c "%u" .env)
|
|
|
|
USER_GID=$(stat -c "%g" .env)
|
|
|
|
groupadd --gid $USER_GID rvr
|
|
|
|
useradd --uid $USER_UID --gid $USER_GID rvr
|
|
|
|
chown -R rvr:rvr cache
|
2023-09-27 21:26:17 +02:00
|
|
|
sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/8.1/fpm/pool.d/www.conf
|
2023-09-28 10:02:00 +02:00
|
|
|
|
|
|
|
set +e
|
|
|
|
|
|
|
|
/usr/sbin/cron -f &
|
2023-09-27 21:26:17 +02:00
|
|
|
/usr/sbin/php-fpm8.1 -F &
|
2023-09-28 10:02:00 +02:00
|
|
|
/usr/sbin/nginx -g 'daemon off;' &
|
|
|
|
|
|
|
|
wait -n
|
|
|
|
|
|
|
|
exit $?
|