generated from coop-cloud/example
Compare commits
19 Commits
1.2.0+1.21
...
main
Author | SHA1 | Date |
---|---|---|
3wc | 4653c0ea66 | |
trav | 05ed929274 | |
3wc | 3d74c22248 | |
3wc | 56d7a64a1b | |
3wordchant | d2308332e4 | |
3wc | 697fe25259 | |
3wc | bad32dd353 | |
3wc | f25c45c5c6 | |
Mayel de Borniol | 6563cfc7e6 | |
3wc | bb9945b38d | |
3wc | c50f5397bf | |
3wc | 2a3021744d | |
3wc | a68a31b45c | |
3wc | 977a81d493 | |
3wc | ba0f1986a0 | |
3wc | 02d0a39db4 | |
3wc | c7d557cc6c | |
3wc | c8ffbe96fe | |
3wc | 29041d2c81 |
BIN
.abra.sh.swp
BIN
.abra.sh.swp
Binary file not shown.
Binary file not shown.
22
.drone.yml
22
.drone.yml
|
@ -3,27 +3,37 @@ kind: pipeline
|
||||||
name: deploy to swarm-test.autonomic.zone
|
name: deploy to swarm-test.autonomic.zone
|
||||||
steps:
|
steps:
|
||||||
- name: deployment
|
- name: deployment
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||||
settings:
|
settings:
|
||||||
host: swarm-test.autonomic.zone
|
host: swarm-test.autonomic.zone
|
||||||
stack: custom_html
|
stack: custom_html
|
||||||
purge: true
|
purge: true
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
deploy_key:
|
deploy_key:
|
||||||
from_secret: drone_ssh_swarm_test
|
from_secret: drone_ssh_swarm_test
|
||||||
environment:
|
environment:
|
||||||
DOMAIN: custom-html.swarm-test.autonomic.zone
|
DOMAIN: custom-html.swarm-test.autonomic.zone
|
||||||
STACK_NAME: custom_html
|
STACK_NAME: custom_html
|
||||||
LETS_ENCRYPT_ENV: production
|
LETS_ENCRYPT_ENV: production
|
||||||
|
NGINX_DEFAULT_CONF_VERSION: v1
|
||||||
|
ENTRYPOINT_CONF_VERSION: v1
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: recipe release
|
name: generate recipe catalogue
|
||||||
steps:
|
steps:
|
||||||
- name: release a new version
|
- name: release a new version
|
||||||
image: thecoopcloud/drone-abra:latest
|
image: plugins/downstream
|
||||||
settings:
|
settings:
|
||||||
command: recipe custom-html release
|
server: https://build.coopcloud.tech
|
||||||
deploy_key:
|
token:
|
||||||
from_secret: abra_bot_deploy_key
|
from_secret: drone_abra-bot_token
|
||||||
|
fork: true
|
||||||
|
repositories:
|
||||||
|
- coop-cloud/auto-recipes-catalogue-json
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event: tag
|
||||||
|
|
Binary file not shown.
|
@ -14,3 +14,12 @@ 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
|
||||||
|
|
BIN
.env.sample.swp
BIN
.env.sample.swp
Binary file not shown.
10
README.md
10
README.md
|
@ -1,9 +1,11 @@
|
||||||
# Custom HTML
|
# Custom HTML
|
||||||
|
|
||||||
|
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/custom-html/status.svg)](https://build.coopcloud.tech/coop-cloud/custom-html)
|
||||||
|
|
||||||
Custom HTML website, served using Nginx.
|
Custom HTML website, served using Nginx.
|
||||||
|
|
||||||
<!-- metadata -->
|
<!-- metadata -->
|
||||||
* **Category**: Apps
|
* **Category**: Development
|
||||||
* **Status**: 2, beta
|
* **Status**: 2, beta
|
||||||
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), 4, upstream
|
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), 4, upstream
|
||||||
* **Healthcheck**: No
|
* **Healthcheck**: No
|
||||||
|
@ -18,12 +20,12 @@ Custom HTML website, served using Nginx.
|
||||||
1. Set up Docker Swarm and [`abra`]
|
1. Set up Docker Swarm and [`abra`]
|
||||||
2. Deploy [`coop-cloud/traefik`]
|
2. Deploy [`coop-cloud/traefik`]
|
||||||
3. `abra app new custom-html`
|
3. `abra app new custom-html`
|
||||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
||||||
your Docker swarm box
|
your Docker swarm box
|
||||||
5. `abra app YOURAPPDOMAIN deploy`
|
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.32.0
|
image: alpine/git:v2.43.0
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- content:/git
|
- content:/git
|
||||||
|
|
14
compose.yml
14
compose.yml
|
@ -3,7 +3,7 @@ version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nginx:1.21.3
|
image: nginx:1.26.0
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -19,9 +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.2.0+1.21.3"
|
- "coop-cloud.${STACK_NAME}.version=1.6.0+1.26.0"
|
||||||
|
- "backupbot.backup=true"
|
||||||
|
- "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:
|
||||||
|
@ -40,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,18 @@ 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 }}
|
||||||
|
|
||||||
|
try_files $uri $uri/ $uri.html =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
#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
|
||||||
#
|
#
|
Loading…
Reference in New Issue