forked from coop-cloud/custom-html
Compare commits
3 Commits
1.4.0+1.24
...
keycloak-s
Author | SHA1 | Date | |
---|---|---|---|
20067dbe93 | |||
3d447a72c8 | |||
0a04bae1f5 |
22
.drone.yml
22
.drone.yml
@ -3,37 +3,27 @@ kind: pipeline
|
||||
name: deploy to swarm-test.autonomic.zone
|
||||
steps:
|
||||
- name: deployment
|
||||
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||
image: decentral1se/stack-ssh-deploy:latest
|
||||
settings:
|
||||
host: swarm-test.autonomic.zone
|
||||
stack: custom_html
|
||||
purge: true
|
||||
networks:
|
||||
- proxy
|
||||
deploy_key:
|
||||
from_secret: drone_ssh_swarm_test
|
||||
environment:
|
||||
DOMAIN: custom-html.swarm-test.autonomic.zone
|
||||
STACK_NAME: custom_html
|
||||
LETS_ENCRYPT_ENV: production
|
||||
NGINX_DEFAULT_CONF_VERSION: v1
|
||||
ENTRYPOINT_CONF_VERSION: v1
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
---
|
||||
kind: pipeline
|
||||
name: generate recipe catalogue
|
||||
name: recipe release
|
||||
steps:
|
||||
- name: release a new version
|
||||
image: plugins/downstream
|
||||
image: thecoopcloud/drone-abra:latest
|
||||
settings:
|
||||
server: https://build.coopcloud.tech
|
||||
token:
|
||||
from_secret: drone_abra-bot_token
|
||||
fork: true
|
||||
repositories:
|
||||
- coop-cloud/auto-recipes-catalogue-json
|
||||
|
||||
trigger:
|
||||
event: tag
|
||||
command: recipe custom-html release
|
||||
deploy_key:
|
||||
from_secret: abra_bot_deploy_key
|
||||
|
@ -9,8 +9,3 @@ 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 * * * *"
|
||||
|
@ -1,11 +1,9 @@
|
||||
# Custom HTML
|
||||
|
||||
[](https://build.coopcloud.tech/coop-cloud/custom-html)
|
||||
|
||||
Custom HTML website, served using Nginx.
|
||||
|
||||
<!-- metadata -->
|
||||
* **Category**: Development
|
||||
* **Category**: Apps
|
||||
* **Status**: 2, beta
|
||||
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
@ -20,9 +18,9 @@ Custom HTML website, served using Nginx.
|
||||
1. Set up Docker Swarm and [`abra`]
|
||||
2. Deploy [`coop-cloud/traefik`]
|
||||
3. `abra app new custom-html`
|
||||
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
||||
your Docker swarm box
|
||||
5. `abra app deploy YOURAPPDOMAIN`
|
||||
5. `abra app YOURAPPDOMAIN deploy`
|
||||
6. Copy your files to the container, using something like
|
||||
```
|
||||
abra app YOURAPPDOMAIN cp index.html app:/usr/share/nginx/html
|
||||
|
1
abra.sh
1
abra.sh
@ -1,2 +1 @@
|
||||
export NGINX_DEFAULT_CONF_VERSION=v1
|
||||
export ENTRYPOINT_CONF_VERSION=v3
|
||||
|
@ -1,26 +0,0 @@
|
||||
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
|
@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.24.0
|
||||
image: nginx:1.21.3
|
||||
networks:
|
||||
- proxy
|
||||
deploy:
|
||||
@ -19,9 +19,7 @@ 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.4.0+1.24.0"
|
||||
- "backupbot.backup=true"
|
||||
- "backupbot.backup.path=/usr/share/nginx/html"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.1.0+1.21.3"
|
||||
environment:
|
||||
DEFAULT_CONF_FILE: /etc/nginx/conf.d/default.conf
|
||||
volumes:
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/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
|
Reference in New Issue
Block a user