do not recreate docker runner group and user
All checks were successful
mapguesser/pipeline/pr-develop This commit looks good
All checks were successful
mapguesser/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
18ddaa1da4
commit
9bafc52626
@ -19,10 +19,14 @@ echo "Migrating DB..."
|
|||||||
./mapg db:migrate
|
./mapg db:migrate
|
||||||
|
|
||||||
echo "Set runner user based on owner of .env..."
|
echo "Set runner user based on owner of .env..."
|
||||||
USER_UID=$(stat -c "%u" .env)
|
if ! getent group mapg; then
|
||||||
USER_GID=$(stat -c "%g" .env)
|
USER_GID=$(stat -c "%g" .env)
|
||||||
groupadd --gid $USER_GID mapg
|
groupadd --gid $USER_GID mapg
|
||||||
|
fi
|
||||||
|
if ! id -u mapg; then
|
||||||
|
USER_UID=$(stat -c "%u" .env)
|
||||||
useradd --uid $USER_UID --gid $USER_GID mapg
|
useradd --uid $USER_UID --gid $USER_GID mapg
|
||||||
|
fi
|
||||||
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
@ -9,10 +9,14 @@ echo "Installing crontab..."
|
|||||||
/usr/bin/crontab docker/scripts/cron
|
/usr/bin/crontab docker/scripts/cron
|
||||||
|
|
||||||
echo "Set runner user based on owner of .env..."
|
echo "Set runner user based on owner of .env..."
|
||||||
USER_UID=$(stat -c "%u" .env)
|
if ! getent group mapg; then
|
||||||
USER_GID=$(stat -c "%g" .env)
|
USER_GID=$(stat -c "%g" .env)
|
||||||
groupadd --gid $USER_GID mapg
|
groupadd --gid $USER_GID mapg
|
||||||
|
fi
|
||||||
|
if ! id -u mapg; then
|
||||||
|
USER_UID=$(stat -c "%u" .env)
|
||||||
useradd --uid $USER_UID --gid $USER_GID mapg
|
useradd --uid $USER_UID --gid $USER_GID mapg
|
||||||
|
fi
|
||||||
chown mapg:mapg cache
|
chown mapg:mapg cache
|
||||||
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user