add entry point for release docker
This commit is contained in:
parent
1c4c9420f8
commit
17633c4005
28
docker/scripts/entry-point.sh
Executable file
28
docker/scripts/entry-point.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/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 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;' &
|
||||||
|
sudo -u rvr -g rvr /usr/bin/node multi &
|
||||||
|
|
||||||
|
wait -n
|
||||||
|
|
||||||
|
exit $?
|
Loading…
Reference in New Issue
Block a user