From f2677d4a6b6ec03f6d74e0bdcb2622eb86f39a3b Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 8 Jul 2022 19:48:52 +0200 Subject: [PATCH] feat: initial attempt --- compose.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/compose.yml b/compose.yml index a2c3805..fcee1fd 100644 --- a/compose.yml +++ b/compose.yml @@ -3,9 +3,25 @@ version: "3.8" services: app: - image: nginx:1.20.0 + image: klakegg/hugo:0.101.0-ext-alpine + environment: + - HUGO_DESTINATION=/output + volumes: + - src:/src + - output:/output + command: ["hugo", "-w"] + web: + image: httpd:2.4 + volumes: + - output:/usr/local/apache2/htdocs/:ro networks: - proxy + command: > + bash -c + " + sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf && + sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /usr/local/apache2/conf/httpd.conf && + httpd -DFOREGROUND" deploy: restart_policy: condition: on-failure @@ -15,18 +31,14 @@ services: - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - ## Redirect from EXTRA_DOMAINS to DOMAIN - #- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" - #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" - #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" - - "coop-cloud.${STACK_NAME}.version=" - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] - interval: 30s - timeout: 10s - retries: 10 - start_period: 1m - + # Redirect from EXTRA_DOMAINS to DOMAIN + - "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" + - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" + - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" + - coop-cloud.${STACK_NAME}.web.version=2.4-31ee85db +volumes: + src: + output: networks: proxy: external: true