forked from coop-cloud/hugo
feat: initial attempt
This commit is contained in:
parent
7770a0d05a
commit
f2677d4a6b
38
compose.yml
38
compose.yml
@ -3,9 +3,25 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
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:
|
networks:
|
||||||
- proxy
|
- 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:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
@ -15,18 +31,14 @@ services:
|
|||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
## Redirect from EXTRA_DOMAINS to DOMAIN
|
# Redirect from EXTRA_DOMAINS to DOMAIN
|
||||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
- "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.SSLForceHost=true"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "coop-cloud.${STACK_NAME}.version="
|
- coop-cloud.${STACK_NAME}.web.version=2.4-31ee85db
|
||||||
healthcheck:
|
volumes:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
src:
|
||||||
interval: 30s
|
output:
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 1m
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user