diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a0aa2052304997ec7c43a5d13d556636dff70fb..4e0e873ff8afe06e26da2c9784454b33603e612e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:20.10.9 variables: DOCKER_TLS_CERTDIR: "/certs" - BUILD_VERSION: p8 + BUILD_VERSION: p9 services: - docker:20.10.9-dind diff --git a/Dockerfile b/Dockerfile index d285ff2435f38f0d6c0b0e8383542b3814a59182..1e4d679a2f4c9eeab5c300d6e188081f408dce61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ MAINTAINER Andrej Ramašeuski <andrej.ramaseuski@pirati.cz> USER 0 RUN install_packages cron COPY crontab /etc/cron.d/ +COPY run.sh /opt/bitnami/scripts/apache/ USER 1001 COPY phpbb /opt/bitnami/phpbb -CMD [ ( cron -f -l 8 & ) & "/opt/bitnami/scripts/apache/run.sh" ] +CMD [ "/opt/bitnami/scripts/apache/run.sh" ] diff --git a/run.sh b/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..06f45ac49a77d9c3843086cb174e6dcccae4d508 --- /dev/null +++ b/run.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# shellcheck disable=SC1091 + +set -o errexit +set -o nounset +set -o pipefail +# set -o xtrace # Uncomment this line for debugging purpose + +# Load libraries +. /opt/bitnami/scripts/libapache.sh +. /opt/bitnami/scripts/liblog.sh + +# Load Apache environment +. /opt/bitnami/scripts/apache-env.sh + +info "** Starting Apache **" +exec cron -l -f && "${APACHE_BIN_DIR}/httpd" -f "$APACHE_CONF_FILE" -D "FOREGROUND"