mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 18:43:29 +00:00
Compare commits
6 Commits
d3aa3298cb
...
b807cc60bc
Author | SHA1 | Date | |
---|---|---|---|
b807cc60bc | |||
2f0862d098 | |||
783f804556 | |||
813306c275 | |||
ff0634c91e | |||
6bd5e2efc5 |
@ -17,6 +17,8 @@ dev-minio:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- minio/*
|
||||
|
||||
minio:
|
||||
stage: build
|
||||
@ -28,6 +30,8 @@ minio:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- minio/*
|
||||
|
||||
dev-watchdog:
|
||||
stage: build
|
||||
@ -39,6 +43,8 @@ dev-watchdog:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- watchdog/*
|
||||
|
||||
watchdog:
|
||||
stage: build
|
||||
@ -50,6 +56,8 @@ watchdog:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- watchdog/*
|
||||
|
||||
dev-unifi:
|
||||
stage: build
|
||||
@ -61,6 +69,8 @@ dev-unifi:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- unifi/*
|
||||
|
||||
unifi:
|
||||
stage: build
|
||||
@ -72,6 +82,8 @@ unifi:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- unifi/*
|
||||
|
||||
dev-keycloak:
|
||||
stage: build
|
||||
@ -83,6 +95,8 @@ dev-keycloak:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- keycloak/*
|
||||
|
||||
keycloak:
|
||||
stage: build
|
||||
@ -94,6 +108,8 @@ keycloak:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- keycloak/*
|
||||
|
||||
dev-restic:
|
||||
stage: build
|
||||
@ -105,6 +121,8 @@ dev-restic:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- restic/*
|
||||
|
||||
restic:
|
||||
stage: build
|
||||
@ -116,6 +134,8 @@ restic:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- restic/*
|
||||
|
||||
pleroma:
|
||||
stage: build
|
||||
@ -127,6 +147,8 @@ pleroma:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- pleroma/*
|
||||
|
||||
dendrite:
|
||||
stage: build
|
||||
@ -138,6 +160,8 @@ dendrite:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- dendrite/*
|
||||
|
||||
roundcubemail:
|
||||
stage: build
|
||||
@ -149,6 +173,8 @@ roundcubemail:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- roundcubemail/*
|
||||
|
||||
borg:
|
||||
stage: build
|
||||
@ -160,6 +186,8 @@ borg:
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||
changes:
|
||||
- borg/*
|
||||
|
||||
.docker_init: &docker_init |
|
||||
if ! docker info &>/dev/null; then
|
||||
|
@ -1,7 +1,9 @@
|
||||
FROM debian:buster-20210208-slim
|
||||
ENV APACHE_CONFDIR /etc/apache2
|
||||
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
|
||||
RUN set -ex; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt-get update -qqy; \
|
||||
apt-get install -qqy --no-install-recommends \
|
||||
php-exif \
|
||||
php-gd \
|
||||
php-intl \
|
||||
@ -19,10 +21,50 @@ RUN set -ex; \
|
||||
dirmngr \
|
||||
locales \
|
||||
libc-l10n \
|
||||
ca-certificates \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
a2enmod rewrite
|
||||
a2dismod mpm_event && a2enmod mpm_prefork && a2enmod rewrite; \
|
||||
mkdir -p /etc/ssl/certs; \
|
||||
curl -fLSko /etc/ssl/certs/cacert.pem https://curl.se/ca/cacert.pem; \
|
||||
sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; \
|
||||
\
|
||||
. "$APACHE_ENVVARS"; \
|
||||
for dir in \
|
||||
"$APACHE_LOCK_DIR" \
|
||||
"$APACHE_RUN_DIR" \
|
||||
"$APACHE_LOG_DIR" \
|
||||
; do \
|
||||
rm -rvf "$dir"; \
|
||||
mkdir -p "$dir"; \
|
||||
chown "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
|
||||
chmod 777 "$dir"; \
|
||||
done; \
|
||||
\
|
||||
rm -rvf /var/www/html/*; \
|
||||
chmod 777 /var/www/html; \
|
||||
\
|
||||
# logs should go to stdout / stderr
|
||||
ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; \
|
||||
ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log"; \
|
||||
ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; \
|
||||
chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR"; \
|
||||
{ \
|
||||
echo '<FilesMatch \.php$>'; \
|
||||
echo '\tSetHandler application/x-httpd-php'; \
|
||||
echo '</FilesMatch>'; \
|
||||
echo; \
|
||||
echo 'DirectoryIndex disabled'; \
|
||||
echo 'DirectoryIndex index.php index.html'; \
|
||||
echo; \
|
||||
echo '<Directory /var/www/>'; \
|
||||
echo '\tOptions -Indexes'; \
|
||||
echo '\tAllowOverride All'; \
|
||||
echo '</Directory>'; \
|
||||
} | tee "$APACHE_CONFDIR/conf-available/docker-php.conf" \
|
||||
&& a2enconf docker-php
|
||||
|
||||
ENV CURL_CA_BUNDLE=/etc/ssl/certs/cacert.pem \
|
||||
SSL_CERT_FILE=/etc/ssl/certs/cacert.pem
|
||||
|
||||
# install composer
|
||||
RUN set -ex; \
|
||||
@ -38,7 +80,7 @@ RUN curl -fL https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait
|
||||
COPY php.ini /usr/local/etc/php/conf.d/roundcube-defaults.ini
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
|
||||
COPY apache2-foreground /usr/local/bin/
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
@ -47,13 +89,15 @@ VOLUME /var/roundcube/config
|
||||
VOLUME /var/roundcube/db
|
||||
VOLUME /var/www/html
|
||||
VOLUME /tmp/roundcube-temp
|
||||
|
||||
WORKDIR /var/www/html
|
||||
STOPSIGNAL SIGWINCH
|
||||
# Define Roundcubemail version
|
||||
ARG VERSION
|
||||
ENV ROUNDCUBEMAIL_VERSION $VERSION
|
||||
|
||||
# Download package and extract to web volume
|
||||
RUN set -ex; \
|
||||
chmod +x /docker-entrypoint.sh /usr/local/bin/apache2-foreground; \
|
||||
curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \
|
||||
curl -o roundcubemail.tar.gz.asc -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz.asc; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
|
40
roundcubemail/apache2-foreground
Normal file
40
roundcubemail/apache2-foreground
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
|
||||
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
|
||||
|
||||
: "${APACHE_CONFDIR:=/etc/apache2}"
|
||||
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
|
||||
if test -f "$APACHE_ENVVARS"; then
|
||||
. "$APACHE_ENVVARS"
|
||||
fi
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
: "${APACHE_RUN_DIR:=/var/run/apache2}"
|
||||
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
|
||||
rm -f "$APACHE_PID_FILE"
|
||||
|
||||
# create missing directories
|
||||
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
|
||||
for e in "${!APACHE_@}"; do
|
||||
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
|
||||
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
|
||||
# mkdir: cannot create directory '/var/lock': File exists
|
||||
dir="${!e}"
|
||||
while [ "$dir" != "$(dirname "$dir")" ]; do
|
||||
dir="$(dirname "$dir")"
|
||||
if [ -d "$dir" ]; then
|
||||
break
|
||||
fi
|
||||
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
|
||||
if [ -n "$absDir" ]; then
|
||||
mkdir -p "$absDir"
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p "${!e}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec apache2 -DFOREGROUND "$@"
|
Loading…
Reference in New Issue
Block a user