feature/create-working-docker-images #68

Merged
bence merged 14 commits from feature/create-working-docker-images into master 2023-09-28 13:33:02 +02:00
Showing only changes of commit 27fe883f59 - Show all commits

27
docker/scripts/entry-point.sh Executable file
View File

@ -0,0 +1,27 @@
#!/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
sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/7.4/fpm/pool.d/www.conf
set +e
/usr/sbin/cron -f &
/usr/sbin/php-fpm7.4 -F &
/usr/sbin/nginx -g 'daemon off;' &
wait -n
exit $?