diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5a733e3..b5fbd400 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,12 +100,13 @@ jobs: run: sleep 60 - name: Check status run: docker ps -a - - name: Logs - run: docker-compose logs - name: Test - run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -s | grep 'Sign in' -q + run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -vvv | grep 'Sign in' -q - name: Test Email run: docker-compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email 'test@example.com' | grep 'Message successfully sent!' -q + - name: Collect logs + if: ${{ always() }} + run: docker-compose -f docker-compose.prod.yml logs test_prod: needs: build_variants runs-on: ubuntu-latest @@ -143,12 +144,13 @@ jobs: run: sleep 60 - name: Check status run: docker ps -a - - name: Logs - run: docker-compose logs - name: Test - run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -s | grep 'Sign in' -q + run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -vvv | grep 'Sign in' -q - name: Test Email run: docker-compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email 'test@example.com' | grep 'Message successfully sent!' -q + - name: Collect logs + if: ${{ always() }} + run: docker-compose -f docker-compose.prod.yml logs push_ghcr: needs: ["test_aio", "test_prod"] runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index ec085992..1e02cb40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,181 +1,214 @@ -ARG HUMHUB_VERSION -ARG VCS_REF -ARG BUILD_DEPS="\ - ca-certificates \ - nodejs \ - npm \ - php81 \ - php81-ctype \ - php81-curl \ - php81-dom \ - php81-exif \ - php81-fileinfo \ - php81-gd \ - php81-iconv \ - php81-intl \ - php81-json \ - php81-ldap \ - php81-mbstring \ - php81-openssl \ - php81-pdo_mysql \ - php81-phar \ - php81-simplexml \ - php81-tokenizer \ - php81-xml \ - php81-xmlreader \ - php81-xmlwriter \ - php81-zip \ - composer \ - tzdata \ - " - -ARG RUNTIME_DEPS="\ - ca-certificates \ - curl \ - imagemagick \ - libintl \ - php81 \ - php81-apcu \ - php81-ctype \ - php81-curl \ - php81-dom \ - php81-exif \ - php81-fileinfo \ - php81-fpm \ - php81-gd \ - php81-iconv \ - php81-intl \ - php81-json \ - php81-ldap \ - php81-mbstring \ - php81-openssl \ - php81-pdo_mysql \ - php81-pecl-imagick \ - php81-phar \ - php81-session \ - php81-simplexml \ - php81-sqlite3 \ - php81-xml \ - php81-xmlreader \ - php81-xmlwriter \ - php81-zip \ - sqlite \ - supervisor \ - tzdata \ - " - -FROM docker.io/library/alpine:3.18.4 as builder - -ARG HUMHUB_VERSION -ARG BUILD_DEPS - -RUN apk add --no-cache --update $BUILD_DEPS && \ - rm -rf /var/cache/apk/* - -WORKDIR /usr/src/ -ADD https://github.com/humhub/humhub/archive/v${HUMHUB_VERSION}.tar.gz /usr/src/ -RUN tar xzf v${HUMHUB_VERSION}.tar.gz && \ - mv humhub-${HUMHUB_VERSION} humhub && \ - rm v${HUMHUB_VERSION}.tar.gz - -WORKDIR /usr/src/humhub - -RUN composer config --no-plugins allow-plugins.yiisoft/yii2-composer true && \ - composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader && \ - chmod +x protected/yii && \ - chmod +x protected/yii.bat && \ - npm install grunt && \ - npm install -g grunt-cli && \ - grunt build-assets && \ - rm -rf ./node_modules - -FROM docker.io/library/alpine:3.18.4 as base - -ARG HUMHUB_VERSION -ARG RUNTIME_DEPS -LABEL name="HumHub" version=${HUMHUB_VERSION} variant="base" \ - org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name="HumHub" \ - org.label-schema.description="HumHub is a feature rich and highly flexible OpenSource Social Network Kit written in PHP" \ - org.label-schema.url="https://www.humhub.com/" \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/mriedmann/humhub-docker" \ - org.label-schema.vendor="HumHub GmbH" \ - org.label-schema.version=${HUMHUB_VERSION} \ - org.label-schema.schema-version="1.0" - -RUN apk add --no-cache --update $RUNTIME_DEPS && \ - apk add --no-cache --virtual temp_pkgs gettext && \ - cp /usr/bin/envsubst /usr/local/bin/envsubst && \ - apk del temp_pkgs && \ - rm -rf /var/cache/apk/* - -ENV PHP_POST_MAX_SIZE=16M -ENV PHP_UPLOAD_MAX_FILESIZE=10M -ENV PHP_MAX_EXECUTION_TIME=60 -ENV PHP_MEMORY_LIMIT=1G -ENV PHP_TIMEZONE=UTC - -RUN touch /var/run/supervisor.sock && \ - chmod 777 /var/run/supervisor.sock - -# 100=nginx 101=nginx (group) -COPY --from=builder --chown=100:101 /usr/src/humhub /var/www/localhost/htdocs/ -COPY --chown=100:101 humhub/ /var/www/localhost/htdocs/ - -RUN mkdir -p /usr/src/humhub/protected/config/ && \ - cp -R /var/www/localhost/htdocs/protected/config/* /usr/src/humhub/protected/config/ && \ - rm -f var/www/localhost/htdocs/protected/config/common.php /usr/src/humhub/protected/config/common.php && \ - echo "v${HUMHUB_VERSION}" > /usr/src/humhub/.version - -COPY base/ / -COPY docker-entrypoint.sh /docker-entrypoint.sh - -RUN chmod 600 /etc/crontabs/nginx && \ - chmod +x /docker-entrypoint.sh - -VOLUME /var/www/localhost/htdocs/uploads -VOLUME /var/www/localhost/htdocs/protected/config -VOLUME /var/www/localhost/htdocs/protected/modules - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["supervisord", "-n", "-c", "/etc/supervisord.conf"] - -FROM base as humhub_phponly - -LABEL variant="phponly" - -RUN apk add --no-cache fcgi - -COPY phponly/ / - -ADD https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck /usr/local/bin/php-fpm-healthcheck -RUN chmod +x /usr/local/bin/php-fpm-healthcheck \ - && addgroup -g 101 -S nginx \ - && adduser --uid 100 -g 101 -S nginx - -EXPOSE 9000 - -FROM docker.io/library/nginx:1.25.3-alpine as humhub_nginx - -LABEL variant="nginx" - -ENV NGINX_CLIENT_MAX_BODY_SIZE=10m \ - NGINX_KEEPALIVE_TIMEOUT=65 \ - NGINX_UPSTREAM=humhub:9000 - -RUN rm -rf /etc/nginx/conf.d/* -COPY nginx/ / -COPY --from=builder --chown=nginx:nginx /usr/src/humhub/ /var/www/localhost/htdocs/ - -FROM base as humhub_allinone - -LABEL variant="allinone" - -RUN apk add --no-cache nginx && \ - chown -R nginx:nginx /var/lib/nginx/ - -RUN rm -rf /etc/nginx/conf.d/* -COPY nginx/ / - -EXPOSE 80 +ARG HUMHUB_VERSION +ARG VCS_REF +ARG BUILD_DEPS="\ + ca-certificates \ + nodejs \ + npm \ + php81 \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-exif \ + php81-fileinfo \ + php81-gd \ + php81-iconv \ + php81-intl \ + php81-json \ + php81-ldap \ + php81-mbstring \ + php81-openssl \ + php81-pdo_mysql \ + php81-phar \ + php81-simplexml \ + php81-tokenizer \ + php81-xml \ + php81-xmlreader \ + php81-xmlwriter \ + php81-zip \ + composer \ + tzdata \ + " + +ARG RUNTIME_DEPS="\ + ca-certificates \ + curl \ + imagemagick \ + libintl \ + php81 \ + php81-apcu \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-exif \ + php81-fileinfo \ + php81-fpm \ + php81-gd \ + php81-iconv \ + php81-intl \ + php81-json \ + php81-ldap \ + php81-mbstring \ + php81-openssl \ + php81-pdo_mysql \ + php81-pecl-imagick \ + php81-phar \ + php81-session \ + php81-simplexml \ + php81-sqlite3 \ + php81-xml \ + php81-xmlreader \ + php81-xmlwriter \ + php81-zip \ + sqlite \ + multirun \ + tzdata \ + " + +FROM docker.io/library/alpine:3.18.4 as builder + +ARG HUMHUB_VERSION +ARG BUILD_DEPS + +RUN apk add --no-cache --update $BUILD_DEPS && \ + rm -rf /var/cache/apk/* + +WORKDIR /usr/src/ +ADD https://github.com/humhub/humhub/archive/v${HUMHUB_VERSION}.tar.gz /usr/src/ +RUN tar xzf v${HUMHUB_VERSION}.tar.gz && \ + mv humhub-${HUMHUB_VERSION} humhub && \ + rm v${HUMHUB_VERSION}.tar.gz + +WORKDIR /usr/src/humhub + +RUN composer config --no-plugins allow-plugins.yiisoft/yii2-composer true && \ + composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader && \ + chmod +x protected/yii && \ + chmod +x protected/yii.bat && \ + npm install grunt && \ + npm install -g grunt-cli && \ + grunt build-assets && \ + rm -rf ./node_modules + +FROM docker.io/library/alpine:3.18.4 as base + +ARG HUMHUB_VERSION +ARG RUNTIME_DEPS +LABEL name="HumHub" version=${HUMHUB_VERSION} variant="base" \ + org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.name="HumHub" \ + org.label-schema.description="HumHub is a feature rich and highly flexible OpenSource Social Network Kit written in PHP" \ + org.label-schema.url="https://www.humhub.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/mriedmann/humhub-docker" \ + org.label-schema.vendor="HumHub GmbH" \ + org.label-schema.version=${HUMHUB_VERSION} \ + org.label-schema.schema-version="1.0" + +RUN apk add --no-cache --update $RUNTIME_DEPS && \ + apk add --no-cache --virtual temp_pkgs gettext && \ + cp /usr/bin/envsubst /usr/local/bin/envsubst && \ + apk del temp_pkgs && \ + rm -rf /var/cache/apk/* && \ + chmod +x /usr/bin/multirun + +ENV PHP_POST_MAX_SIZE=16M +ENV PHP_UPLOAD_MAX_FILESIZE=10M +ENV PHP_MAX_EXECUTION_TIME=60 +ENV PHP_MEMORY_LIMIT=1G +ENV PHP_TIMEZONE=UTC + +# 101=nginx 0=root (group) +COPY --from=builder --chown=101:0 /usr/src/humhub /var/www/localhost/htdocs/ +COPY --chown=101:0 humhub/ /var/www/localhost/htdocs/ + +RUN mkdir -p /usr/src/humhub/protected/config/ && \ + cp -R /var/www/localhost/htdocs/protected/config/* /usr/src/humhub/protected/config/ && \ + rm -f var/www/localhost/htdocs/protected/config/common.php /usr/src/humhub/protected/config/common.php && \ + echo "v${HUMHUB_VERSION}" > /usr/src/humhub/.version + +# Non-root directories +RUN mkdir -p /var/www/localhost/htdocs/protected/runtime/logs && \ + mkdir -p /var/www/localhost/htdocs/uploads /var/www/localhost/htdocs/assets /var/www/localhost/htdocs/protected/modules /var/www/localhost/htdocs/themes /var/www/localhost/htdocs/protected/config && \ + mkdir -p /run/nginx /run/php-fpm && \ + touch /var/www/localhost/htdocs/protected/runtime/logs/app.log && \ + chown 101:0 -R /var/www/localhost/htdocs/protected/runtime/logs /run/nginx /run/php-fpm \ + /var/www/localhost/htdocs/uploads /var/www/localhost/htdocs/assets \ + /var/www/localhost/htdocs/protected/modules /var/www/localhost/htdocs/themes \ + /var/www/localhost/htdocs/protected/config + + +COPY base/ / +COPY docker-entrypoint.sh /docker-entrypoint.sh + +RUN chmod 600 /etc/crontabs/nginx && \ + chown 101:0 /etc/crontabs/nginx && \ + rm /etc/crontabs/root && \ + chmod +x /docker-entrypoint.sh + +VOLUME /var/www/localhost/htdocs/uploads +VOLUME /var/www/localhost/htdocs/protected/config +VOLUME /var/www/localhost/htdocs/protected/modules + +ENTRYPOINT ["/docker-entrypoint.sh"] + + +#+----------- +# HumHub PHP +#+----------- +FROM base as humhub_phponly + +LABEL variant="phponly" + +USER root +RUN apk add --no-cache fcgi + +COPY phponly/ / + +ADD https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck /usr/local/bin/php-fpm-healthcheck +RUN chmod +x /usr/local/bin/php-fpm-healthcheck \ + && adduser --uid 101 -g 0 -S nginx + +EXPOSE 9000 +USER nginx +CMD ["multirun", "/usr/sbin/php-fpm81 --fpm-config /etc/php-fpm.d/pool.conf -O -F", "tail -f /var/www/localhost/htdocs/protected/runtime/logs/app.log", "crond -f -L /proc/self/fd/2"] + + +#+------------- +# HumHub NGINX +#+------------- +FROM docker.io/library/nginx:1.25.3-alpine as humhub_nginx + +LABEL variant="nginx" + +ENV NGINX_CLIENT_MAX_BODY_SIZE=10m \ + NGINX_KEEPALIVE_TIMEOUT=65 \ + NGINX_UPSTREAM=humhub:9000 + +USER root +RUN rm -rf /etc/nginx/conf.d/* +COPY nginx/ / +COPY --from=builder --chown=nginx:nginx /usr/src/humhub/ /var/www/localhost/htdocs/ +RUN mkdir -p /var/cache/nginx /run/nginx && \ + chown nginx:nginx -R /etc/nginx /var/cache/nginx /run/nginx + +USER nginx + +#+------------------ +# HumHub All-in-one +#+------------------ +FROM base as humhub_allinone + +LABEL variant="allinone" + +USER root +RUN apk add --no-cache nginx && \ + mkdir -p /etc/nginx && \ + chown -R nginx:nginx /var/lib/nginx/ /etc/nginx + +RUN rm -rf /etc/nginx/conf.d/* +COPY nginx/ / +RUN chown nginx:nginx -R /etc/nginx + +EXPOSE 80 +USER nginx +CMD ["/usr/bin/multirun", "/usr/sbin/php-fpm81 --fpm-config /etc/php-fpm.d/pool.conf -O -F", "tail -f /var/www/localhost/htdocs/protected/runtime/logs/app.log", "crond -f -L /proc/self/fd/2", "/usr/sbin/nginx -g 'daemon off;'"] diff --git a/base/etc/php-fpm.d/listen.conf b/base/etc/php-fpm.d/listen.conf index fccb72ee..66f8daeb 100644 --- a/base/etc/php-fpm.d/listen.conf +++ b/base/etc/php-fpm.d/listen.conf @@ -1,3 +1,3 @@ -listen = /run/php-fpm.sock +listen = /run/nginx/php-fpm.sock listen.owner = nginx -listen.group = nginx +listen.group = root diff --git a/base/etc/php-fpm.d/pool.conf b/base/etc/php-fpm.d/pool.conf index c532b01b..2b038b05 100644 --- a/base/etc/php-fpm.d/pool.conf +++ b/base/etc/php-fpm.d/pool.conf @@ -10,9 +10,6 @@ daemonize = no include = /etc/php-fpm.d/listen.conf access.log = /proc/self/fd/2 -user = nginx -group = nginx - pm = ondemand pm.max_children = 5 pm.process_idle_timeout = 10s diff --git a/base/etc/supervisord.conf b/base/etc/supervisord.conf deleted file mode 100644 index 25b3ede1..00000000 --- a/base/etc/supervisord.conf +++ /dev/null @@ -1,17 +0,0 @@ -[supervisord] -user=root -nodaemon=true -loglevel=warn -pidfile=/var/run/supervisord.pid -logfile=/proc/self/fd/2 -stdout_logfile=/proc/self/fd/2 -stdout_logfile_maxbytes=0 - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock - -[include] -files=/etc/supervisord.conf.d/*.conf diff --git a/base/etc/supervisord.conf.d/cron.conf b/base/etc/supervisord.conf.d/cron.conf deleted file mode 100644 index 2f01ec34..00000000 --- a/base/etc/supervisord.conf.d/cron.conf +++ /dev/null @@ -1,5 +0,0 @@ -[program:cron] -command=crond -f -L /proc/self/fd/2 -user=root -autostart=true -autorestart=true diff --git a/base/etc/supervisord.conf.d/humhub-log.conf b/base/etc/supervisord.conf.d/humhub-log.conf deleted file mode 100644 index 8bf6a87e..00000000 --- a/base/etc/supervisord.conf.d/humhub-log.conf +++ /dev/null @@ -1,7 +0,0 @@ -[program:humhub-log] -command=tail -f /var/www/localhost/htdocs/protected/runtime/logs/app.log -autostart = true -stdout_logfile=/proc/self/fd/2 -stdout_logfile_maxbytes=0 -stderr_logfile=/proc/self/fd/2 -stderr_logfile_maxbytes=0 diff --git a/base/etc/supervisord.conf.d/php-fpm.conf b/base/etc/supervisord.conf.d/php-fpm.conf deleted file mode 100644 index edfb2115..00000000 --- a/base/etc/supervisord.conf.d/php-fpm.conf +++ /dev/null @@ -1,8 +0,0 @@ -[program:php-fpm] -command=/usr/sbin/php-fpm81 --fpm-config /etc/php-fpm.d/pool.conf -O -F -user=root -autostart = true -stdout_logfile=/proc/self/fd/2 -stdout_logfile_maxbytes=0 -stderr_logfile=/proc/self/fd/2 -stderr_logfile_maxbytes=0 diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index a2edae24..920d640a 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -32,8 +32,8 @@ services: HUMHUB_DB_NAME: 'humhub' HUMHUB_AUTO_INSTALL: 1 # HUMHUB_DEBUG: 1 # you can currently not use debug in prod - HUMHUB_PROTO: 'https' - HUMHUB_HOST: 'localhost' + #HUMHUB_PROTO: 'http' + #HUMHUB_HOST: 'localhost:8080' # Mailer install setup HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS: 'noreply@example.com' HUMHUB_MAILER_SYSTEM_EMAIL_NAME: 'HumHub' diff --git a/docker-compose.yml b/docker-compose.yml index acda4b92..70a0bb41 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,12 @@ version: '3.1' services: humhub: - image: docker.io/mriedmann/humhub:latest + #image: docker.io/mriedmann/humhub:latest + image: humhub + build: + context: . + args: + - HUMHUB_VERSION=1.15.2 ports: - "8080:80" environment: @@ -15,8 +20,8 @@ services: HUMHUB_DB_NAME: 'humhub' HUMHUB_AUTO_INSTALL: 1 HUMHUB_DEBUG: 1 - HUMHUB_PROTO: 'https' - HUMHUB_HOST: 'localhost' + #HUMHUB_PROTO: 'https' + #HUMHUB_HOST: 'localhost' # Mailer install setup HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS: 'noreply@example.com' HUMHUB_MAILER_SYSTEM_EMAIL_NAME: 'HumHub' diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 0e0ffc2d..7eae256d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -128,12 +128,6 @@ else mkdir -p /var/www/localhost/htdocs/protected/runtime/logs/ touch /var/www/localhost/htdocs/protected/runtime/logs/app.log - echo >&3 "$0: Setting permissions..." - chown -R nginx:nginx /var/www/localhost/htdocs/uploads - chown -R nginx:nginx /var/www/localhost/htdocs/protected/modules - chown -R nginx:nginx /var/www/localhost/htdocs/protected/config - chown -R nginx:nginx /var/www/localhost/htdocs/protected/runtime - wait_for_db echo >&3 "$0: Creating database..." @@ -191,9 +185,6 @@ else php yii 'settings/set' 'base' 'mailer.encryption' "${HUMHUB_MAILER_ENCRYPTION}" php yii 'settings/set' 'base' 'mailer.allowSelfSignedCerts' "${HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS}" fi - - chown -R nginx:nginx /var/www/localhost/htdocs/protected/runtime - chown nginx:nginx /var/www/localhost/htdocs/protected/config/dynamic.php fi fi diff --git a/nginx/docker-entrypoint.d/60-nginx-config.sh b/nginx/docker-entrypoint.d/60-nginx-config.sh index 70c9677c..7f3eee65 100755 --- a/nginx/docker-entrypoint.d/60-nginx-config.sh +++ b/nginx/docker-entrypoint.d/60-nginx-config.sh @@ -2,7 +2,7 @@ set -e -export NGINX_UPSTREAM="${NGINX_UPSTREAM:-unix:/run/php-fpm.sock}" +export NGINX_UPSTREAM="${NGINX_UPSTREAM:-unix:/run/nginx/php-fpm.sock}" export NGINX_CLIENT_MAX_BODY_SIZE="${NGINX_CLIENT_MAX_BODY_SIZE:-10m}" export NGINX_KEEPALIVE_TIMEOUT="${NGINX_KEEPALIVE_TIMEOUT:-65}" diff --git a/nginx/etc/nginx/nginx.conf b/nginx/etc/nginx/nginx.conf index dff9704a..70694dd6 100644 --- a/nginx/etc/nginx/nginx.conf +++ b/nginx/etc/nginx/nginx.conf @@ -5,7 +5,7 @@ worker_processes 1; error_log /dev/stderr notice; #error_log logs/error.log info; -pid /run/nginx.pid; +pid /run/nginx/nginx.pid; events { diff --git a/nginx/etc/supervisord.conf.d/nginx.conf b/nginx/etc/supervisord.conf.d/nginx.conf deleted file mode 100644 index 75b9c7d8..00000000 --- a/nginx/etc/supervisord.conf.d/nginx.conf +++ /dev/null @@ -1,8 +0,0 @@ -[program:nginx] -command=/usr/sbin/nginx -g 'daemon off;' -user=root -autostart = true -stdout_logfile=/proc/self/fd/2 -stdout_logfile_maxbytes=0 -stderr_logfile=/proc/self/fd/2 -stderr_logfile_maxbytes=0 diff --git a/test/docker-compose.yml b/test/docker-compose.yml deleted file mode 100644 index acd587b4..00000000 --- a/test/docker-compose.yml +++ /dev/null @@ -1,65 +0,0 @@ -version: '3.1' -services: - humhub: - restart: always - image: mriedmann/humhub:1.6.3 - container_name: humhub - hostname: humhub - environment: - # 1 => true, set to "false" to disable. - HUMHUB_DB_USER: humhub - HUMHUB_DB_PASSWORD: humhub - HUMHUB_DB_HOST: 'db' - HUMHUB_DB_NAME: 'humhub' - HUMHUB_AUTO_INSTALL: 1 - HUMHUB_DEBUG: 1 - HUMHUB_PROTO: 'http' - HUMHUB_HOST: humhum.com # alt.humhub.com - # Reverseproxy variables - VIRTUAL_HOST: humhum.com # alt.humhumb.com - # Let's encrpyt variables - LETSENCRYPT_HOST: humhum.com # alt.humhub.com - LETSENCRYPT_EMAIL: admin@humhum.com - NGINX_KEEPALIVE_TIMEOUT: '65' - NGINX_CLIENT_MAX_BODY_SIZE: '10m' - - volumes: - - '/opt/docker/humhub/data/humhub/protected/config:/var/www/localhost/htdocs/protected/config:Z' - - '/opt/docker/humhub/data/humhub/protected/modules:/var/www/localhost/htdocs/protected/modules:Z' - - '/opt/docker/humhub/data/humhub/uploads:/var/www/localhost/htdocs/uploads:Z' - - '/opt/docker/humhub/data/humhub/themes:/var/www/localhost/htdocs/themes/humhum:Z' - # Not strictly necessary, just to shut up the log file - - '/opt/docker/humhub/data/humhub/protected/runtime/logs:/var/www/localhost/htdocs/protected/runtime/logs/:Z' - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost/ping"] - interval: 30s - timeout: 10s - retries: 3 - ports: - - 8080:80 - networks: - - coltero - - db: - restart: always - image: mariadb:latest - container_name: mariadb - hostname: humhub - environment: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: 'humhub' - MYSQL_USER: humhub - MYSQL_PASSWORD: humhub - volumes: - - '/opt/docker/humhub/data/mariadb/:/var/lib/mysql:Z' - healthcheck: - test: ["CMD", "mysqladmin", "ping", "--silent"] - interval: 30s - timeout: 10s - retries: 3 - networks: - - coltero - -networks: - coltero: - external: true