initial
This commit is contained in:
commit
a007caf449
38
.drone.yml
Normal file
38
.drone.yml
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: deploy to swarm-test.autonomic.zone
|
||||
steps:
|
||||
- name: deployment
|
||||
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||
settings:
|
||||
host: swarm-test.autonomic.zone
|
||||
stack: example_com # UPDATE ME
|
||||
generate_secrets: true
|
||||
purge: true
|
||||
deploy_key:
|
||||
from_secret: drone_ssh_swarm_test
|
||||
networks:
|
||||
- proxy
|
||||
environment:
|
||||
DOMAIN: example.swarm-test.autonomic.zone # UPDATE ME
|
||||
STACK_NAME: example_com # UPDATE ME
|
||||
LETS_ENCRYPT_ENV: production
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
---
|
||||
kind: pipeline
|
||||
name: generate recipe catalogue
|
||||
steps:
|
||||
- name: release a new version
|
||||
image: plugins/downstream
|
||||
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
|
29
.env.sample
Normal file
29
.env.sample
Normal file
@ -0,0 +1,29 @@
|
||||
TYPE=borgwarehouse
|
||||
|
||||
DOMAIN=borgwarehouse.example.com
|
||||
|
||||
## Domain aliases
|
||||
#EXTRA_DOMAINS=', `www.borgwarehouse.example.com`'
|
||||
|
||||
LETS_ENCRYPT_ENV=production
|
||||
|
||||
## Required variables section ##
|
||||
|
||||
# Hostname and URL
|
||||
NEXTAUTH_URL=https://your.domain.com
|
||||
|
||||
# Secrects
|
||||
NEXTAUTH_SECRET=your-secret
|
||||
CRONJOB_KEY=your-other-secret
|
||||
|
||||
# data folders (volume mounts)
|
||||
# set this variable if you have a dedicated share/mount on the server that can hold your borg repos
|
||||
# the folder must be owned by 1001:1001
|
||||
# BORG_REPOSITORY_PATH=./repos
|
||||
|
||||
# SMTP server settings
|
||||
#MAIL_SMTP_FROM=
|
||||
#MAIL_SMTP_HOST=
|
||||
#MAIL_SMTP_PORT=
|
||||
#MAIL_SMTP_LOGIN=
|
||||
#MAIL_REJECT_SELFSIGNED_TLS=true
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.envrc
|
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# borgwarehouse
|
||||
|
||||
> One line description of the recipe
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
* **Category**: Apps
|
||||
* **Status**: 0
|
||||
* **Image**: [`borgwarehouse`](https://hub.docker.com/r/borgwarehouse), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Email**: No
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
|
||||
<!-- endmetadata -->
|
||||
|
||||
## Quick start
|
||||
|
||||
* `abra app new borgwarehouse --secrets`
|
||||
* `abra app config <app-name>`
|
||||
* `abra app deploy <app-name>`
|
||||
|
||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
40
compose.yml
Normal file
40
compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: borgwarehouse/borgwarehouse:v3.0.0
|
||||
user: "1001:1001"
|
||||
environment:
|
||||
- WEB_SERVER_PORT=3000
|
||||
- SSH_SERVER_PORT=2002
|
||||
- FQDN=${DOMAIN}
|
||||
- MAIL_SMTP_PWD_FILE="/run/secrets/smtp_password"
|
||||
volumes:
|
||||
- config:/home/borgwarehouse/app/config
|
||||
- sshkey:/home/borgwarehouse/.ssh
|
||||
- sshhost:/etc/ssh
|
||||
- ${BORG_REPOSITORY_PATH:-repos}:/home/borgwarehouse/repos
|
||||
- tmp:/home/borgwarehouse/tmp
|
||||
- log:/home/borgwarehouse/logs
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
|
||||
- "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}"
|
||||
- "coop-cloud.${STACK_NAME}.version=0.1.0+v3.0.0"
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
config:
|
||||
sshkey:
|
||||
sshhost:
|
||||
repos:
|
||||
tmp:
|
||||
log:
|
27
entrypoint.sh.tmpl
Normal file
27
entrypoint.sh.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
|
||||
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
|
||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local val="$def"
|
||||
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(< "${!fileVar}")"
|
||||
fi
|
||||
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
file_env "MAIL_SMTP_PWD"
|
0
release/.git-keep-me
Normal file
0
release/.git-keep-me
Normal file
Loading…
x
Reference in New Issue
Block a user