This commit is contained in:
3wc 2020-10-06 21:09:14 +02:00
parent 485585483d
commit e8e8ad0a0a
2 changed files with 16 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Custom-Html
# Custom HTML
Custom HTML website, served using Nginx
Custom HTML website, served using Nginx.
## Basic usage
@ -12,6 +12,10 @@ Custom HTML website, served using Nginx
your Docker swarm box
5. `direnv allow` (or `. .envrc`)
6. `abra deploy`
7. Copy your files to the container, using something like
```
abra cp index.html app:/usr/share/nginx/html
```
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`compose-stacks/traefik`]: https://git.autonomic.zone/compose-stacks/traefik

View File

@ -15,10 +15,12 @@ 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}"
# 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}"
volumes:
- content:/usr/share/nginx/html
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
@ -26,6 +28,10 @@ services:
retries: 10
start_period: 1m
volumes:
content:
networks:
proxy:
external: true