mirror of
https://git.netzspielplatz.de/docker-multiarch/flarum.git
synced 2025-11-08 18:29:31 +00:00
initial commit
This commit is contained in:
commit
50cabe84c0
2 changed files with 44 additions and 0 deletions
24
.gitlab-ci.yml
Normal file
24
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
image: egon0/docker-with-buildx-and-git
|
||||
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
build:
|
||||
stage: build
|
||||
variables:
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
D_IMAGE_TAG: egon0/flarum-docker:$CI_COMMIT_REF_SLUG
|
||||
D_LATEST_TAG: egon0/flarum-docker:latest
|
||||
script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||
- git pull https://github.com/mondediefr/docker-flarum.git
|
||||
- cd docker-flarum
|
||||
- git apply ../chown-fix.patch
|
||||
- docker buildx create --use --name A$CI_COMMIT_SHORT_SHA
|
||||
- docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-(date +%Y-%m-%d) -t $D_IMAGE_TAG -t $D_LATEST_TAG -t egon0/flarum-docker:$CI_COMMIT_REF_NAME-(date +%Y-%m-%d).
|
||||
20
chown-fix.patch
Normal file
20
chown-fix.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/rootfs/usr/local/bin/startup b/rootfs/usr/local/bin/startup
|
||||
index b8ee399..55a8882 100644
|
||||
--- a/rootfs/usr/local/bin/startup
|
||||
+++ b/rootfs/usr/local/bin/startup
|
||||
@@ -23,12 +23,11 @@ sed -i "s/<OPCACHE_MEMORY_LIMIT>/${OPCACHE_MEMORY_LIMIT}/g" /etc/php8/conf.d/00_
|
||||
# Set permissions for /flarum folder
|
||||
echo "[INFO] Setting folder permissions"
|
||||
for folder in /etc/s6.d /run/php /var/log /var/lib/nginx; do
|
||||
- find ${folder} ! -user "${UID}" -exec chown -h "${UID}:${GID}" {} \+
|
||||
- find ${folder} ! -group "${GID}" -exec chown -h "${UID}:${GID}" {} \+
|
||||
+ echo {$folder}
|
||||
+ chown -R "${UID}:${GID}" ${folder}
|
||||
done
|
||||
|
||||
-find /flarum ! -user "${UID}" -exec chown "${UID}:${GID}" {} \+
|
||||
-find /flarum ! -group "${GID}" -exec chown "${UID}:${GID}" {} \+
|
||||
+chown -R "${UID}:${GID}" /flarum
|
||||
|
||||
# Set log output to STDOUT if wanted (LOG_TO_STDOUT=true)
|
||||
if [ "${LOG_TO_STDOUT}" = true ]; then
|
||||
Loading…
Add table
Add a link
Reference in a new issue