forked from coop-cloud/custom-html
Compare commits
11 Commits
1.3.2+1.23
...
singlepage
Author | SHA1 | Date | |
---|---|---|---|
fb2a287802 | |||
c788b36f13 | |||
565230650d | |||
18c564a354 | |||
4653c0ea66 | |||
05ed929274 | |||
3d74c22248 | |||
56d7a64a1b | |||
d2308332e4 | |||
697fe25259 | |||
6563cfc7e6 |
@ -33,7 +33,7 @@ steps:
|
|||||||
from_secret: drone_abra-bot_token
|
from_secret: drone_abra-bot_token
|
||||||
fork: true
|
fork: true
|
||||||
repositories:
|
repositories:
|
||||||
- coop-cloud/auto-recipes-catalogue-json
|
- toolshed/auto-recipes-catalogue-json
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event: tag
|
event: tag
|
||||||
|
12
.env.sample
12
.env.sample
@ -14,3 +14,15 @@ COMPOSE_FILE="compose.yml"
|
|||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.git-pull.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.git-pull.yml"
|
||||||
#GIT_REPO_URL="https://git.coopcloud.tech/dalmationer/hexbomb.gay"
|
#GIT_REPO_URL="https://git.coopcloud.tech/dalmationer/hexbomb.gay"
|
||||||
#CRON_SCHEDULE="*/1 * * * *"
|
#CRON_SCHEDULE="*/1 * * * *"
|
||||||
|
|
||||||
|
# Optionally redirect the entire domain or a sub-path:
|
||||||
|
# path under which you want to redirect all URLs (with trailing slash):
|
||||||
|
#REDIRECT_FROM_PATH=/
|
||||||
|
# full URL of target domain (and optionally path) with trailing slash:
|
||||||
|
#REDIRECT_TO_URL=https://coopcloud.tech/
|
||||||
|
# temporary or permanent redirect? (uncomment one)
|
||||||
|
#REDIRECT_TYPE=redirect
|
||||||
|
#REDIRECT_TYPE=permanent
|
||||||
|
|
||||||
|
# Optionally handle all URL requests using a single file (commonly index.html)
|
||||||
|
#SINGLE_PAGE_SITE_HANDLER=/index.html
|
@ -25,7 +25,7 @@ Custom HTML website, served using Nginx.
|
|||||||
5. `abra app deploy YOURAPPDOMAIN`
|
5. `abra app deploy YOURAPPDOMAIN`
|
||||||
6. Copy your files to the container, using something like
|
6. Copy your files to the container, using something like
|
||||||
```
|
```
|
||||||
abra app YOURAPPDOMAIN cp index.html app:/usr/share/nginx/html
|
abra app cp YOURAPPDOMAIN index.html app:/usr/share/nginx/html
|
||||||
```
|
```
|
||||||
|
|
||||||
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||||
|
2
abra.sh
2
abra.sh
@ -1,2 +1,2 @@
|
|||||||
export NGINX_DEFAULT_CONF_VERSION=v1
|
export NGINX_DEFAULT_CONF_VERSION=v5
|
||||||
export ENTRYPOINT_CONF_VERSION=v3
|
export ENTRYPOINT_CONF_VERSION=v3
|
||||||
|
@ -3,7 +3,7 @@ services:
|
|||||||
git:
|
git:
|
||||||
environment:
|
environment:
|
||||||
- GIT_REPO_URL
|
- GIT_REPO_URL
|
||||||
image: alpine/git:v2.36.3
|
image: alpine/git:v2.45.2
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- content:/git
|
- content:/git
|
||||||
|
12
compose.yml
12
compose.yml
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nginx:1.23.3
|
image: nginx:1.27.2
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
deploy:
|
deploy:
|
||||||
@ -19,11 +19,14 @@ services:
|
|||||||
- "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=1.3.2+1.23.3"
|
- "coop-cloud.${STACK_NAME}.version=1.7.1+1.27.2"
|
||||||
- "backupbot.backup=true"
|
- "backupbot.backup=true"
|
||||||
- "backupbot.backup.path=/usr/share/nginx/html"
|
- "backupbot.backup.path=/usr/share/nginx/html"
|
||||||
environment:
|
environment:
|
||||||
DEFAULT_CONF_FILE: /etc/nginx/conf.d/default.conf
|
- DEFAULT_CONF_FILE=/etc/nginx/conf.d/default.conf
|
||||||
|
- REDIRECT_FROM_PATH
|
||||||
|
- REDIRECT_TO_URL
|
||||||
|
- REDIRECT_TYPE
|
||||||
volumes:
|
volumes:
|
||||||
- content:/usr/share/nginx/html
|
- content:/usr/share/nginx/html
|
||||||
configs:
|
configs:
|
||||||
@ -42,7 +45,8 @@ volumes:
|
|||||||
configs:
|
configs:
|
||||||
nginx_default_conf:
|
nginx_default_conf:
|
||||||
name: ${STACK_NAME}_nginx_default_conf_${NGINX_DEFAULT_CONF_VERSION}
|
name: ${STACK_NAME}_nginx_default_conf_${NGINX_DEFAULT_CONF_VERSION}
|
||||||
file: default.conf
|
file: default.conf.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
|
@ -10,10 +10,22 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ $uri.html;
|
|
||||||
|
{{ if env "REDIRECT_TO_URL" }}
|
||||||
|
rewrite ^{{ env "REDIRECT_FROM_PATH" }}(.*)$ {{ env "REDIRECT_TO_URL" }}$1 {{ env "REDIRECT_TYPE" }};
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if env "SINGLE_PAGE_SITE_HANDLER" }}
|
||||||
|
try_files $uri $uri/ {{ env "SINGLE_PAGE_SITE_HANDLER" }} =404;
|
||||||
|
{{ else }}
|
||||||
|
try_files $uri $uri/ $uri.html =404;
|
||||||
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
|
location = /404.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
# redirect server error pages to the static page /50x.html
|
||||||
#
|
#
|
Reference in New Issue
Block a user