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:
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue