Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec4d3806ce
|
||
|
|
0c2334502d
|
||
|
|
6341072b0b
|
||
|
|
1dbd813bef
|
||
|
|
14d83d24b4
|
||
|
|
ba02b6d8cb
|
||
|
|
9b8fcaad9a
|
||
|
|
6bd6ede442
|
No files matched your search
Vendored
+11
@@ -98,6 +98,17 @@ pipeline {
|
||||
--push \
|
||||
.""",
|
||||
label: 'Build Docker image'
|
||||
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
if (env.VERSION ==~ '.*-\\d+-g[a-f0-9]{7}') {
|
||||
env.FIXED_VERSION = 'dev'
|
||||
} else {
|
||||
env.FIXED_VERSION = 'stable'
|
||||
}
|
||||
sh script: """docker buildx imagetools create \
|
||||
-t git.esoko.eu/esoko/rvr:${env.FIXED_VERSION} \
|
||||
git.esoko.eu/esoko/rvr:${env.VERSION}"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,10 +16,14 @@ echo "Migrating DB..."
|
||||
./rvr db:migrate
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -9,10 +9,14 @@ 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
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user