diff --git a/README.md b/README.md index a5543d9..500e973 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/compose.yml b/compose.yml index 662a96c..190e251 100644 --- a/compose.yml +++ b/compose.yml @@ -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