Compare commits

...
8 changed files with 80 additions and 10 deletions
+13 -5
View File
@@ -8,6 +8,8 @@ steps:
host: swarm-test.autonomic.zone
stack: custom_html
purge: true
networks:
- proxy
deploy_key:
from_secret: drone_ssh_swarm_test
environment:
@@ -19,11 +21,17 @@ trigger:
- main
---
kind: pipeline
name: recipe release
name: generate recipe catalogue
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
image: plugins/downstream
settings:
command: recipe custom-html release
deploy_key:
from_secret: abra_bot_deploy_key
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag
+10
View File
@@ -4,3 +4,13 @@ DOMAIN=custom-html.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.custom-html.example.com`'
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
# Single Sign On via Traefik "file provider"
#COMPOSE_FILE="$COMPOSE_FILE:compose.sso.yml"
# Git-pull regularly
#COMPOSE_FILE="$COMPOSE_FILE:compose.git-pull.yml"
#GIT_REPO_URL="https://git.coopcloud.tech/dalmationer/hexbomb.gay"
#CRON_SCHEDULE="*/1 * * * *"
+5 -3
View File
@@ -1,15 +1,17 @@
# 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.
<!-- metadata -->
* **Category**: Apps
* **Status**: ❷💛
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), ❶💚, upstream
* **Status**: 2, beta
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), 4, upstream
* **Healthcheck**: No
* **Backups**: No
* **Email**: N/A
* **Tests**: ❷💛
* **Tests**: 2
* **SSO**: No
<!-- endmetadata -->
+1
View File
@@ -1 +1,2 @@
export NGINX_DEFAULT_CONF_VERSION=v1
export ENTRYPOINT_CONF_VERSION=v3
+26
View File
@@ -0,0 +1,26 @@
version: "3.8"
services:
git:
environment:
- GIT_REPO_URL
image: alpine/git:v2.36.3
entrypoint: /docker-entrypoint.sh
volumes:
- content:/git
configs:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
deploy:
mode: replicated
replicas: 0
labels:
- "swarm.cronjob.enable=true"
- "swarm.cronjob.schedule=${CRON_SCHEDULE:-*/5 * * * *}"
restart_policy:
condition: none
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.git-pull.sh
+8
View File
@@ -0,0 +1,8 @@
version: "3.8"
services:
app:
environment:
- TFA_MIDDLEWARE_NAME
deploy:
labels:
- "traefik.http.routers.${STACK_NAME}.middlewares=${TFA_MIDDLEWARE_NAME}@file"
+6 -2
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nginx:1.19.2
image: nginx:1.23.3
networks:
- proxy
deploy:
@@ -19,7 +19,11 @@ services:
- "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=1.0.0+1.19.2"
- "coop-cloud.${STACK_NAME}.version=1.3.1+1.23.3"
- "backupbot.backup=true"
- "backupbot.backup.path=/usr/share/nginx/html"
environment:
DEFAULT_CONF_FILE: /etc/nginx/conf.d/default.conf
volumes:
- content:/usr/share/nginx/html
configs:
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
if [ ! -d /git/.git ]; then
echo "No repo found, emptying /git/ directory"
rm -r /git/*
echo "Cloning $GIT_REPO_URL into /git"
git clone "$GIT_REPO_URL" /git
else
echo "Updating /git"
git pull
fi