This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
Actual/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Actual
URL: actual.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Actual failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Actual failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Actual succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Actual failed.
when:
status:
- failure

3
Actual/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Actual
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Actual/status.svg)](https://drone.alexlebens.net/alexlebens/Actual)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Actual - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://actual.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "actual",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Actual - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://actual.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

43
Actual/docker-compose.yml Normal file
View File

@@ -0,0 +1,43 @@
services:
actual:
container_name: actual
image: jlongster/actual-server:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.actual.entrypoints: websecure
traefik.http.routers.actual.rule: Host(`actual.alexlebens.net`)
traefik.http.routers.actual.service: actual
traefik.http.services.actual.loadbalancer.server.port: 5006
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
privileged: true
restart: always
volumes:
- server:/app/server-files
- user:/app/user-files
networks:
traefik:
name: traefik
external: true
volumes:
server:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/actual_server
user:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/actual_user

110
Apprise/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Apprise
URL: apprise.alexlebens.net mind.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Apprise failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Apprise failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Apprise succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Apprise failed.
when:
status:
- failure

3
Apprise/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Apprise
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Apprise/status.svg)](https://drone.alexlebens.net/alexlebens/Apprise)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Apprise - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://apprise.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "apprise_api",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Apprise Mind - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://mind.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "apprise_mind",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Apprise - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://apprise.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Apprise Mind - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://mind.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,68 @@
services:
apprise_api:
container_name: apprise_api
environment:
- PUID=1000
- PGID=1000
- TZ=America/Denver
image: lscr.io/linuxserver/apprise-api:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.apprise_api.entrypoints: websecure
traefik.http.routers.apprise_api.rule: Host(`apprise.alexlebens.net`)
traefik.http.routers.apprise_api.service: apprise_api
traefik.http.services.apprise_api.loadbalancer.server.port: 8000
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
volumes:
- apprise_config:/config
mind:
container_name: apprise_mind
environment:
- TZ=America/Denver
image: 'mrcas/mind:latest'
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.apprise_mind.entrypoints: websecure
traefik.http.routers.apprise_mind.rule: Host(`mind.alexlebens.net`)
traefik.http.routers.apprise_mind.service: apprise_mind
traefik.http.services.apprise_mind.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
volumes:
- mind_db:/app/db
networks:
traefik:
name: traefik
external: true
volumes:
apprise_config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/apprise_config
mind_db:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/apprise_mind_db

110
Audiobookshelf/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Audiobookshelf
URL: audiobookshelf.alexlebens.net openaudible.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Audiobookshelf failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Audiobookshelf failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Audiobookshelf succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Audiobookshelf failed.
when:
status:
- failure

4
Audiobookshelf/.env Normal file
View File

@@ -0,0 +1,4 @@
AUDIOBOOKSHELF_UID=1024
AUDIOBOOKSHELF_GID=65536
PORT=80
SOURCE=docker

3
Audiobookshelf/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Audiobookshelf
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Audiobookshelf/status.svg)](https://drone.alexlebens.net/alexlebens/Audiobookshelf)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Audiobookshelf - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://audiobookshelf.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "audiobookshelf",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Audiobookshelf Openaudible - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://openaudible.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "audiobookshelf_openaudible",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Audiobookshelf - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://audiobookshelf.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Audiobookshelf Openaudible - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://openaudible.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,61 @@
services:
audiobookshelf:
container_name: audiobookshelf
env_file:
- .env
image: advplyr/audiobookshelf:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.audiobookshelf.entrypoints: websecure
traefik.http.routers.audiobookshelf.rule: Host(`audiobookshelf.alexlebens.net`)
traefik.http.routers.audiobookshelf.service: audiobookshelf
traefik.http.services.audiobookshelf.loadbalancer.server.port: 80
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
privileged: true
volumes:
- audiobooks_nfs:/audiobooks
- podcasts_nfs:/podcasts
- audiobookshelf_metadata:/metadata
- audiobookshelf_config:/config
networks:
traefik:
name: traefik
external: true
volumes:
audiobookshelf_metadata:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/audiobookshelf_metadata
audiobookshelf_config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/audiobookshelf_config
audiobooks_nfs:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.194,nfsvers=4
device: ":/volume2/Storage/Audiobooks"
podcasts_nfs:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.194,nfsvers=4
device: ":/volume2/Storage/Podcasts"

110
Authentik/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Authentik
URL: authentik.alexlebens.net authentikldap.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Authentik failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Authentik failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Authentik succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Authentik failed.
when:
status:
- failure

17
Authentik/.env Normal file
View File

@@ -0,0 +1,17 @@
POSTGRES_PASSWORD='0dJ+B16mOL7J25Quw3PzseRJhQfGKUcAuzGFiU7WqoUbBOrH'
POSTGRES_USER='authentik'
POSTGRES_DB='authentik'
AUTHENTIK_REDIS__HOST='redis'
AUTHENTIK_POSTGRESQL__HOST='postgresql'
AUTHENTIK_POSTGRESQL__USER='authentik'
AUTHENTIK_POSTGRESQL__NAME='authentik'
AUTHENTIK_POSTGRESQL__PASSWORD='0dJ+B16mOL7J25Quw3PzseRJhQfGKUcAuzGFiU7WqoUbBOrH'
AUTHENTIK_SECRET_KEY='SY8kT618oeYGjbSShODJk7rxM9JXnw7oa+vSDq7O0XEP1BvQ'
AUTHENTIK_ERROR_REPORTING__ENABLED='true'
WORKERS='1'
AUTHENTIK_HOST='https://authentik.alexlebens.net'
AUTHENTIK_INSECURE='false'
AUTHENTIK_TOKEN='dIA2OZiTUBn4Df7motslW6sm3nDEIbdbursrVhk2sM6LFtbnZdpapLIdQCb3'
SSL_CERT_FILE='/etc/ssl/certs/ca-certificates.crt'

3
Authentik/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Authentik
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Authentik/status.svg)](https://drone.alexlebens.net/alexlebens/Authentik)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Authentik PostgreSQL - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "authentik_postgresql",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Authentik Redis - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "authentik_redis",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Authentik Server - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "authentik_server",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Authentik Worker - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "authentik_worker",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Authentik LDAP - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "authentik_ldap",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Authentik - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://authentik.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,185 @@
services:
postgresql:
container_name: authentik_postgresql
env_file:
- .env
image: postgres:12-alpine
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"
]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
authentik:
ipv4_address: 172.14.0.3
restart: unless-stopped
volumes:
- postgressql:/var/lib/postgresql/data
redis:
command: --save 60 1 --loglevel warning
container_name: authentik_redis
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
image: redis:alpine
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
authentik:
ipv4_address: 172.14.0.2
restart: unless-stopped
volumes:
- redis:/data
authentik:
command: server
container_name: authentik_server
depends_on:
- postgresql
- redis
env_file:
- .env
image: ghcr.io/goauthentik/server:2022.12.2
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.authentik.entrypoints: websecure
traefik.http.routers.authentik.rule: Host(`authentik-old.alexlebens.net`)
traefik.http.routers.authentik.service: authentik
traefik.http.services.authentik.loadbalancer.server.port: 9000
traefik.http.routers.authentikoutpost.rule: HostRegexp(`{subdomain:[a-z0-9-]+}.alexlebens.net`) && PathPrefix(`/outpost.goauthentik.io/`)
traefik.http.routers.authentikoutpost.entrypoints: websecure
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
authentik:
ipv4_address: 172.14.0.10
restart: unless-stopped
privileged: true
volumes:
- media:/media
- templates:/templates
authentik_worker:
command: worker
container_name: authentik_worker
depends_on:
- authentik
env_file:
- .env
image: ghcr.io/goauthentik/server:2022.12.2
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
authentik:
ipv4_address: 172.14.0.11
privileged: true
restart: unless-stopped
user: root
volumes:
- backups:/backups
- certs:/certs
- media:/media
- templates:/templates
- /var/run/docker.sock:/var/run/docker.sock
authentik_ldap:
container_name: authentik_ldap
depends_on:
- authentik
env_file:
- .env
image: ghcr.io/goauthentik/ldap:2022.12.2
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
authentik:
ipv4_address: 172.14.0.12
traefik: null
ports:
- 192.168.1.15:389:389/tcp
- 192.168.1.15:636:636/tcp
privileged: true
restart: unless-stopped
networks:
traefik:
name: traefik
external: true
authentik:
name: authentik
external: false
ipam:
config:
- subnet: 172.14.0.0/16
volumes:
postgressql:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_postgressql
redis:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_redis
backups:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_backups
certs:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_certs
media:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_media
templates:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/authentik_templates

110
Calibre/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Calibre
URL: calibre.alexlebens.net calibredb.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Calibre failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Calibre failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Calibre succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Calibre failed.
when:
status:
- failure

3
Calibre/.env Normal file
View File

@@ -0,0 +1,3 @@
PUID=1000
PGID=1000
TZ=America/Denver

3
Calibre/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Calibre
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Calibre/status.svg)](https://drone.alexlebens.net/alexlebens/Calibre)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Calibre - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://calibre.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "calibre",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Calibre DB - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://calibredb.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "calibre_database",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Calibre - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://calibre.alexlebens.net/login",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Calibre DB - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://calibredb.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,81 @@
services:
calibre_db:
container_name: calibre_database
env_file:
- .env
image: lscr.io/linuxserver/calibre:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.calibre_database.entrypoints: websecure
traefik.http.routers.calibre_database.rule: Host(`calibredb.alexlebens.net`)
traefik.http.routers.calibre_database.service: calibre_database
traefik.http.services.calibre_database.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
privileged: true
restart: unless-stopped
security_opt:
- seccomp:unconfined
user: root
volumes:
- calibre_database_config:/config
- books_nfs:/books
calibre_web:
container_name: calibre_web
env_file:
- .env
image: lscr.io/linuxserver/calibre-web:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.calibre_web.entrypoints: websecure
traefik.http.routers.calibre_web.rule: Host(`calibre.alexlebens.net`)
traefik.http.routers.calibre_web.service: calibre_web
traefik.http.routers.calibre_web.middlewares: calibreweb-theme@file
traefik.http.services.calibre_web.loadbalancer.server.port: 8083
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: unless-stopped
privileged: true
volumes:
- calibre_web_config:/config
- books_nfs:/books:ro
networks:
traefik:
name: traefik
external: true
volumes:
calibre_database_config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/calibre_calibre_database
calibre_web_config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/calibre_web_config
books_nfs:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.194,nfsvers=4
device: :/volume2/Storage/Books

110
Checkrr/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Checkrr
URL: checkrr.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Checkrr failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Checkrr failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Checkrr succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Checkrr failed.
when:
status:
- failure

View File

@@ -0,0 +1,112 @@
checkrr:
checkpath:
- "/mnt/store/Anime"
- "/mnt/store/Anime Movies"
- "/mnt/store/Documentaries"
- "/mnt/store/Documentary Shows"
- "/mnt/store/Movies"
- "/mnt/store/Movies Classics"
- "/mnt/store/Movies Foreign"
- "/mnt/store/Music/Music Artists"
- "/mnt/store/Stand Up"
- "/mnt/store/TV Shows"
database: /tmp/checkrr.db
debug: true
csvfile: /tmp/badfiles.csv
logfile: /tmp/checkrr.log
logjson: false
cron: "@daily"
ignorehidden: true
ignoreexts:
- .txt
- .nfo
- .nfo-orig
- .nzb
- .url
- .db
- .srt
- .ac3
- .m2ts
arr:
radarr:
process: true
service: radarr
address: 172.27.1.30
apikey: e6e3d6f4aafe4e499d970cfcbf042db9
baseurl: /
port: 7878
radarranime:
process: true
service: radarr
address: 172.27.1.61
apikey: fb126bad31d64d43bb669ad81329954d
baseurl: /
port: 7878
radarrart:
process: true
service: radarr
address: 172.27.1.62
apikey: 32365893c4234f8a9ad96d68d6e7a520
baseurl: /
port: 7878
radarrdocumentaries:
process: true
service: radarr
address: 172.27.1.63
apikey: fd03f47363324096a56d0a453623420b
baseurl: /
port: 7878
radarrstandup:
process: true
service: radarr
address: 172.27.1.64
apikey: c7c425b3fbcf4112895aceec7729f4d1
baseurl: /
port: 7878
sonarr:
process: true
service: sonarr
address: 172.27.1.31
apikey: 7f0dfeea4b9f410d96b5ffa2f809d1e8
baseurl: /
port: 8989
sonarranime:
process: true
service: sonarr
address: 172.27.1.70
apikey: a2f10e70559c4ee3b8ff1d6cdc5a41f1
baseurl: /
port: 8989
sonarrdocumentaries:
process: true
service: sonarr
address: 172.27.1.72
apikey: 3ed988c3731b45ad8124b7d55b620d6b
baseurl: /
port: 8989
lidarr:
service: lidarr
process: true
address: 172.27.1.32
apikey: d25bd6d24f4e4b90a21fc5b70bcb9fd9
baseurl: /
port: 8686
notifications:
discord:
url: https://discord.com/api/webhooks/988292688501698590/7rh8CfveLozzH9qTJdLK6zxBAwpPqzC6jeDGwo92xoOhHgHR7UuWIsnS1fJUdriErpWN
notificationtypes:
- reacquire
- unknowndeleted
- unknowndetected
- startrun
- endrun
pushover:
apitoken: ae7g9zjetygqc1myexgszjp44z5xx8
recipient: pixel7
notificationtypes:
- reacquire
webserver:
port: 8585
baseurl: "/"
trustedproxies:
- 172.27.0.0/16

3
Checkrr/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Checkrr
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Checkrr/status.svg)](https://drone.alexlebens.net/alexlebens/Checkrr)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Checkrr - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://checkrr.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "checkrr",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Checkrr - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://checkrr.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,56 @@
services:
checkrr:
command:
- --config-file=/tmp/checkrr.yaml
container_name: checkrr
environment:
- TZ=America/Denver
image: aetaric/checkrr:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.checkrr.entrypoints: websecure
traefik.http.routers.checkrr.rule: Host(`checkrr.alexlebens.net`)
traefik.http.routers.checkrr.service: checkrr
traefik.http.routers.checkrr.middlewares: authentik@file
traefik.http.services.checkrr.loadbalancer.server.port: 8585
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
privileged: true
user: root
volumes:
- checkrr:/tmp
- storage_nfs:/mnt/store
networks:
traefik:
name: traefik
external: true
volumes:
checkrr:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/servarr_checkrr
# storage:
# driver: local
# driver_opts:
# type: cifs
# o: username=aurailious,password=24wrsfxv@$$WRSFXV,file_mode=0777,dir_mode=0777
# device: "//192.168.1.194/Storage"
storage_nfs:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.194,nfsvers=4
device: :/volume2/Storage

110
CloudflareDDNS/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: CloudflareDDNS
URL: ""
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for CloudflareDDNS failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for CloudflareDDNS failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CloudflareDDNS succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CloudflareDDNS failed.
when:
status:
- failure

3
CloudflareDDNS/README.md Normal file
View File

@@ -0,0 +1,3 @@
# CloudflareDDNS
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/CloudflareDDNS/status.svg)](https://drone.alexlebens.net/alexlebens/CloudflareDDNS)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "CloudflareDDNS - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://www.cloudflare.com",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "cloudflare_ddns",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "CloudflareDDNS Synology - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://www.cloudflare.com",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "cloudflare_ddns_synology",
"docker_host": 1
}

View File

@@ -0,0 +1,55 @@
services:
cloudflare_ddns_root:
container_name: cloudflare_ddns_root
environment:
- API_KEY=t48J4O_n5uNYHGXfCHZ1SRbCLwNTZAR6n1sZHj6d
- ZONE=alexlebens.net
- PROXIED=false
image: oznu/cloudflare-ddns:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: unless-stopped
cloudflare_ddns_wildcard:
container_name: cloudflare_ddns_wildcard
environment:
- API_KEY=VfWsmY_1_hYyT-w4TNwR-3yKp4UvkoY_BQ8KUxJf
- ZONE=alexlebens.net
- SUBDOMAIN=*
- PROXIED=false
image: oznu/cloudflare-ddns:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: unless-stopped
cloudflare_ddns_synology:
container_name: cloudflare_ddns_synology
environment:
- API_KEY=t48J4O_n5uNYHGXfCHZ1SRbCLwNTZAR6n1sZHj6d
- ZONE=alexlebens.net
- SUBDOMAIN=synology
- PROXIED=false
image: oznu/cloudflare-ddns:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: unless-stopped
networks:
traefik:
name: traefik
external: true

110
CodeServer/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: CodeServer
URL: codeserver.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for CodeServer failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for CodeServer failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CodeServer succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CodeServer failed.
when:
status:
- failure

3
CodeServer/.env Normal file
View File

@@ -0,0 +1,3 @@
DOCKER_USER=1000
USER=1000
HOME=/home/coder

3
CodeServer/README.md Normal file
View File

@@ -0,0 +1,3 @@
# CodeServer
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/CodeServer/status.svg)](https://drone.alexlebens.net/alexlebens/CodeServer)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "CodeServer - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://codeserver.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "code_server",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "CodeServer - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://codeserver.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,39 @@
services:
code_server:
command: --auth none --disable-telemetry
container_name: code_server
env_file:
- .env
image: 'codercom/code-server:latest'
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.code_server.entrypoints: websecure
traefik.http.routers.code_server.rule: Host(`codeserver.alexlebens.net`)
traefik.http.routers.code_server.service: code_server
traefik.http.routers.code_server.middlewares: authentik@file
traefik.http.services.code_server.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
user: "1000:1000"
volumes:
- home:/home/coder/
networks:
traefik:
name: traefik
external: true
volumes:
home:
driver: local
driver_opts:
type: none
o: bind
device: /opt/code_server_home/

110
CoreDNS/.drone.yml Executable file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: CoreDNS
URL: ""
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for CoreDNS failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for CoreDNS failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CoreDNS succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for CoreDNS failed.
when:
status:
- failure

View File

@@ -0,0 +1,20 @@
alexlebens.net {
file /etc/coredns/alexlebens.net.zone {
reload 10s
}
bufsize 4096
log
errors
prometheus :9153
reload 30s
auto
}
.:53 {
forward . 172.27.1.3
bufsize 4096
log
errors
prometheus :9153
reload 30s
}

View File

@@ -0,0 +1,89 @@
$ORIGIN alexlebens.net.
$TTL 86400
@ IN SOA patryk.ns.cloudflare.com. alexanderlebens.gmail.com. (
2021121701 ; serial
3H ; refresh after 3 hours
1H ; retry after 1 hour
1W ; expire after 1 week
1D) ; minimum TTL of 1 day
; Name Server
IN NS patryk.ns.cloudflare.com.
IN NS veda.ns.cloudflare.com.
; IN NS dns1.alexlebens.net.
; Name Server
IN NS patryk.ns.cloudflare.com.
IN NS veda.ns.cloudflare.com.
; IN NS dns1.alexlebens.net.
alexlebens.net. IN A 192.168.1.15
www IN A 192.168.1.15
dns1 IN A 192.168.1.15
pd04wd IN A 192.168.1.115
ps03fd IN A 192.168.1.15
ps08rp IN A 192.168.1.136
talos-ibv-goo IN A 192.168.1.16
talos-luo-mqa IN A 192.168.1.192
talos-uk2-e0z IN A 192.168.1.39
talos-yed-cb6 IN A 192.168.1.126
talos IN A 192.168.1.192
talos IN A 192.168.1.39
talos IN A 192.168.1.126
airgradientbr IN A 192.168.1.100
hdhr IN A 192.168.1.213
pibox IN A 192.168.1.40
pikvm IN A 192.168.1.57
synology IN A 192.168.1.55
synologybond IN A 192.168.1.194
unifi IN A 192.168.1.1
traefik-ps08rp IN A 192.168.1.136
technitium-ps08rp IN A 192.168.1.136
pihole IN A 192.168.1.15
alertmanager IN A 192.168.1.16
argocd IN A 192.168.1.16
audiobookshelf IN A 192.168.1.16
authentik IN A 192.168.1.16
calibre IN A 192.168.1.16
codeserver IN A 192.168.1.16
kubernetes IN A 192.168.1.16
gitea IN A 192.168.1.16
grafana IN A 192.168.1.16
homeassistant IN A 192.168.1.16
homepage IN A 192.168.1.16
jellyfin IN A 192.168.1.16
kargo IN A 192.168.1.16
minio IN A 192.168.1.16
minio-console IN A 192.168.1.16
navidrome IN A 192.168.1.16
n8n IN A 192.168.1.16
outline IN A 192.168.1.16
pgadmin IN A 192.168.1.16
plex IN A 192.168.1.16
prometheus IN A 192.168.1.16
promtail IN A 192.168.1.16
rss IN A 192.168.1.16
tautulli IN A 192.168.1.16
traefik IN A 192.168.1.16
tubearchivist IN A 192.168.1.16
vault IN A 192.168.1.16
vikunja IN A 192.168.1.16
overseerr IN A 192.168.1.16
prowlarr IN A 192.168.1.16
readarr IN A 192.168.1.16
radarr IN A 192.168.1.16
sonarr IN A 192.168.1.16
lidarr IN A 192.168.1.16
tdaarr IN A 192.168.1.16
qbittorrent IN A 192.168.1.16

3
CoreDNS/README.md Executable file
View File

@@ -0,0 +1,3 @@
# CoreDNS
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/CoreDNS/status.svg)](https://drone.alexlebens.net/alexlebens/CoreDNS)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "CoreDNS - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "coredns",
"docker_host": 1
}

33
CoreDNS/docker-compose.yml Executable file
View File

@@ -0,0 +1,33 @@
services:
coredns:
command: "-conf /etc/coredns/Corefile"
container_name: coredns
image: coredns/coredns:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.2
ports:
- 192.168.1.15:53:53/tcp
- 192.168.1.15:53:53/udp
restart: always
privileged: true
volumes:
- config:/etc/coredns
networks:
traefik:
name: traefik
external: true
volumes:
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/coredns_config

View File

@@ -0,0 +1,41 @@
---
kind: pipeline
type: docker
name: trigger
steps:
- name: trigger
image: plugins/downstream
settings:
server: https://drone.alexlebens.net
token:
from_secret: drone_token
fork: true
repositories:
- alexlebens/DroneImage
- name: Nofification > Discord | Trigger - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Trigger executed from Deployment Scripts to DroneImage
when:
status:
- sucess
- name: Nofification > Discord | Trigger - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Trigger failed from Deployment Scripts to DroneImage
when:
status:
- failure

View File

@@ -0,0 +1,111 @@
#!/usr/bin/env bash
#set -e
echo ">>>> Configuration"
WORKINGDIR=$(pwd)
echo ">>> Apply"
echo ">> Storage"
PATH_FAILURE=true
PATHS=$(yq '.volumes[].driver_opts.device | select(. > "/var*")' docker-compose.yml)
for dir in $PATHS; do
if ! ssh -q drone@$HOST_IP "sudo test -d $dir"; then
echo "Missing path: $dir"
ssh -q drone@$HOST_IP "sudo test -d $dir"
ssh drone@$HOST_IP "sudo mkdir -p $dir"
ssh drone@$HOST_IP "sudo chown alexlebens:alexlebens $dir"
if ! ssh -q drone@$HOST_IP "sudo test -d $dir"; then
echo "Failed to create path: $dir"
ssh -q drone@$HOST_IP "sudo test -d $dir"
else
echo "Path created: $dir"
PATH_FAILURE=false
fi
else
echo "Path found: $dir"
PATH_FAILURE=false
fi
done
echo ">>> Checks"
echo ">> DNS"
URL_CHECK=true
URL_FAILURE=false
if [ -n "$URL" ]; then
for i in $URL; do
if [ "$(dig +short -t a $i)" ]; then
echo "URL found: $i"
URL_CHECK=false
else
echo "URL not found: $i"
URL_FAILURE=true
fi
done
else
echo "No URL set"
URL_CHECK=false
fi
echo ">> Uptime"
cd UptimeKuma
UPTIME_CHECK=true
UPTIME_FAILURE=false
TOKEN=$(curl -X 'POST' "${UPTIMEKUMA_URL}/login/access-token" -H 'accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d "grant_type=&username=${UPTIMEKUMA_NAME}&password=${UPTIMEKUMA_PASSWORD}&scope=&client_id=&client_secret=" | jq -r ".access_token")
MONITORS=$(curl -X 'GET' "${UPTIMEKUMA_URL}/monitors" -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" -s | jq --arg PACKAGE $PACKAGE '[ .monitors[] | select( .name | contains($PACKAGE))]')
echo "Found the following monitors:"
echo "$MONITORS" | jq -r '.[].name'
for file in *; do
IFS_HOLD=$IFS
IFS=$'\n'
for type in $(echo "$MONITORS" | jq -r '.[].name'); do
MONITOR_NAME=$(cat $file | jq -r '.name')
echo "Comparing '$MONITOR_NAME' and '$type'"
if [ "$MONITOR_NAME" == $type ]; then
echo "Found monitor for $file"
UPTIME_CHECK=false
continue 2
fi
done
IFS=$IFS_HOLD
echo "Missing monitor for $file"
RESPONSE=$(curl -X POST "${UPTIMEKUMA_URL}/monitors" -H 'accept: application/json' -H "Authorization: Bearer ${TOKEN}" -H 'Content-Type: application/json' -d "$(cat $file)" -s)
RESPONSE_MESSAGE=$(echo $RESPONSE | jq -r '.msg')
if [ "$RESPONSE_MESSAGE" == "Added Successfully." ]; then
echo "Created monitor for $file"
UPTIME_CHECK=false
else
echo "Failed creating monitor for $file: $RESPONSE_MESSAGE"
echo "$RESPONSE"
UPTIME_FAILURE=true
fi
done
cd $WORKINGDIR
echo ">>> Exit"
if $URL_CHECK || $URL_FAILURE || $UPTIME_CHECK || $UPTIME_FAILURE; then
echo "Exiting with Errors"
echo "URL_CHECK: $URL_CHECK || URL_FAILURE: $URL_FAILURE || UPTIME_CHECK: $UPTIME_CHECK || UPTIME_FAILURE: $UPTIME_FAILURE"
fi

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -e
sleep 5
echo ">>>> Deploy"
WORKINGDIR=$(pwd)
echo ">>> Files"
if test -d "Files"; then
echo "Found files to copy"
cd Files
for dir in *; do
echo "Copying files for $dir"
FILE_PATH="/var/lib/docker/volumes/partition/"
echo "Copying directory '$dir' to $FILE_PATH"
rsync --rsync-path="sudo rsync" --progress -aiv $dir drone@$HOST_IP:$FILE_PATH
ssh drone@$HOST_IP "sudo chown -R alexlebens:alexlebens $FILE_PATH/$dir"
# ssh drone@$HOST_IP "sudo chmod -R 600 $FILE_PATH/$dir"
done
echo "Finished copying files"
cd $WORKINGDIR
else
echo "No files to copy"
fi
echo ">>> Compose"
if ! test -f "./docker-compose.yml"
then
echo ">> ERROR: No docker-compose.yml in directory"
continue
fi
echo ">> Deploy"
docker compose --project-name $(echo $PACKAGE | tr "[:upper:]" "[:lower:]") stop
sleep 10
docker compose --project-name $(echo $PACKAGE | tr "[:upper:]" "[:lower:]") up --wait
sleep 1

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
sleep 5
echo ">>>> Tests"
echo ">>> Syntax Check"
if ! test -f "./docker-compose.yml"
then
echo ">> ERROR: No docker-compose.yml in directory"
continue
fi
echo ">> Syntax check"
docker compose convert -q
echo "Passed syntax check"

110
DockerRegistry/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: DockerRegistry
URL: ""
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for DockerRegistry failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for DockerRegistry failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for DockerRegistry succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for DockerRegistry failed.
when:
status:
- failure

5
DockerRegistry/.env Normal file
View File

@@ -0,0 +1,5 @@
# REGISTRY_HTTP_TLS_CERTIFICATE=/certs/registry.crt
# REGISTRY_HTTP_TLS_KEY=/certs/registry.key
# REGISTRY_AUTH=htpasswd
# REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
# REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm

3
DockerRegistry/README.md Normal file
View File

@@ -0,0 +1,3 @@
# DockerRegistry
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/DockerRegistry/status.svg)](https://drone.alexlebens.net/alexlebens/DockerRegistry)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Docker Registry - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://ps03fd.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "docker_registry",
"docker_host": 1
}

View File

@@ -0,0 +1,33 @@
services:
registry:
container_name: docker_registry
env_file:
- .env
image: registry:2
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
ports:
- 5000:5000
restart: always
privileged: true
user: root
volumes:
- registry:/var/lib/registry
networks:
traefik:
name: traefik
external: true
volumes:
registry:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/docker_registry

110
DroneCI/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: DroneCI
URL: drone.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for DroneCI failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for DroneCI failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for DroneCI succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for DroneCI failed.
when:
status:
- failure

7
DroneCI/.env Normal file
View File

@@ -0,0 +1,7 @@
DRONE_GITEA_SERVER=https://gitea.alexlebens.net
DRONE_GITEA_CLIENT_ID=7c34bd96-3dd6-4d29-aef8-193df1fc9d71
DRONE_GITEA_CLIENT_SECRET=gto_ylpzlyzggy3cd6lrynbmcyzy6mgevruulaktwckyvxq3q5i37xea
DRONE_RPC_SECRET=c4060eb0bb4e7ab9f5cdeb5fa87698f7
DRONE_SERVER_HOST=https://drone.alexlebens.net
DRONE_SERVER_PROTO=https
DRONE_USER_CREATE=username:alexlebens,admin:true

4
DroneCI/.run.env Normal file
View File

@@ -0,0 +1,4 @@
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: 172.22.0.11
DRONE_RPC_SECRET: c4060eb0bb4e7ab9f5cdeb5fa87698f7
DRONE_RUNNER_CAPACITY: 2

3
DroneCI/README.md Normal file
View File

@@ -0,0 +1,3 @@
# DroneCI
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/DroneCI/status.svg)](https://drone.alexlebens.net/alexlebens/DroneCI)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "DroneCI - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://drone.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "drone",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "DroneCI Runner 1 - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://drone.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "drone_runner_1",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "DroneCI Runner 2 - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://drone.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "drone_runner_2",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "DroneCI - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://drone.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,91 @@
services:
drone:
container_name: drone
env_file:
- .env
image: drone/drone:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.drone.entrypoints: websecure
traefik.http.routers.drone.rule: Host(`drone.alexlebens.net`)
traefik.http.routers.drone.service: drone
traefik.http.services.drone.loadbalancer.server.port: 80
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
drone:
ipv4_address: 172.22.0.11
traefik: null
restart: always
volumes:
- drone_data:/data
drone_runner_1:
container_name: drone_runner_1
depends_on:
- drone
env_file:
- .run.env
environment:
DRONE_RUNNER_NAME: drone_runner_1
DRONE_RUNNER_NETWORKS: traefik
image: drone/drone-runner-docker:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
drone:
ipv4_address: 172.22.0.12
privileged: true
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
drone_runner_2:
container_name: drone_runner_2
depends_on:
- drone
env_file:
- .run.env
environment:
DRONE_RUNNER_NAME: drone_runner_2
DRONE_RUNNER_NETWORKS: traefik
image: drone/drone-runner-docker:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
drone:
ipv4_address: 172.22.0.13
privileged: true
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
traefik:
name: traefik
external: true
drone:
name: drone
external: false
ipam:
config:
- subnet: 172.22.0.0/16
volumes:
drone_data:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/drone_data

63
DroneImage/.drone.yml Normal file
View File

@@ -0,0 +1,63 @@
---
kind: pipeline
type: docker
name: deploy_image
steps:
- name: pull-scripts
image: alpine/git
commands:
- git clone https://gitea.alexlebens.net/alexlebens/DeploymentScripts.git
- name: docker-cron
image: plugins/docker
settings:
repo: ps03fd.alexlebens.net:5000/droneimage
registry: ps03fd.alexlebens.net:5000
insecure: true
dockerfile: ./Dockerfile
tags: latest
when:
event:
- cron
cron:
include:
- nightly
- name: docker-main
image: plugins/docker
settings:
repo: ps03fd.alexlebens.net:5000/droneimage
registry: ps03fd.alexlebens.net:5000
insecure: true
dockerfile: ./Dockerfile
tags: latest
when:
branch:
- main
- name: Nofification > Discord | Build - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Succeeded building Drone Image
when:
status:
- sucess
- name: Nofification > Discord | Build - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Failed building Drone Image
when:
status:
- failure

20
DroneImage/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM alpine:latest
# Install base packages
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk add --update --no-cache \
bash \
git \
openssh \
curl \
docker \
docker-cli \
docker-cli-compose \
bind-tools \
yq \
jq \
rsync
# Install deployment scripts
COPY ./DeploymentScripts /scripts
RUN chmod -R +x /scripts

3
DroneImage/README.md Normal file
View File

@@ -0,0 +1,3 @@
# DroneImage
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/DroneImage/status.svg)](https://drone.alexlebens.net/alexlebens/DroneImage)

110
Firefly/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Firefly
URL: firefly.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Firefly failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Firefly failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Firefly succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Firefly failed.
when:
status:
- failure

142
Firefly/.env Normal file
View File

@@ -0,0 +1,142 @@
TZ=America/Denver
# App settings
SITE_OWNER=alexanderlebens@gmail.com
APP_ENV=local
APP_DEBUG=false
APP_KEY=SomeRandomStringOf32CharsExactly
APP_URL=https://firefly.alexlebens.net
APP_LOG_LEVEL=notice
AUDIT_LOG_LEVEL=info
DEFAULT_LANGUAGE=en_US
DEFAULT_LOCALE=equal
TRUSTED_PROXIES=**
LOG_CHANNEL=stack
# Used when logging to papertrail:
PAPERTRAIL_HOST=
PAPERTRAIL_PORT=
# Database credentials
DB_CONNECTION=mysql
DB_HOST=172.27.1.55
DB_PORT=3306
DB_DATABASE=firefly
DB_USERNAME=firefly
DB_PASSWORD=secret_firefly_password
MYSQL_RANDOM_ROOT_PASSWORD=yes
MYSQL_USER=firefly
MYSQL_PASSWORD=secret_firefly_password
MYSQL_DATABASE=firefly
MYSQL_USE_SSL=false
MYSQL_SSL_VERIFY_SERVER_CERT=true
MYSQL_SSL_CAPATH=/etc/ssl/certs/
MYSQL_SSL_CA=
MYSQL_SSL_CERT=
MYSQL_SSL_KEY=
MYSQL_SSL_CIPHER=
# Cache
CACHE_DRIVER=file
SESSION_DRIVER=file
REDIS_SCHEME=tcp
REDIS_PATH=
REDIS_HOST=
REDIS_PORT=
REDIS_USERNAME=
REDIS_PASSWORD=.
REDIS_DB="0"
REDIS_CACHE_DB="1"
# Cookie settings
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
COOKIE_SAMESITE=lax
# Mail
MAIL_MAILER=log
MAIL_HOST=null
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
# Other mail drivers:
MAILGUN_DOMAIN=
MAILGUN_SECRET=
MAILGUN_ENDPOINT=api.mailgun.net
MANDRILL_SECRET=
SPARKPOST_SECRET=
# Firefly III can send you the following messages.
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
SEND_LOGIN_NEW_IP_WARNING=true
# These messages contain (sensitive) transaction information:
SEND_REPORT_JOURNALS=true
# Set this value to true if you want to set the location
ENABLE_EXTERNAL_MAP=false
# The map will default to this location:
MAP_DEFAULT_LAT=51.983333
MAP_DEFAULT_LONG=5.916667
MAP_DEFAULT_ZOOM=6
# Firefly III authentication settings
# Firefly III supports a few authentication methods:
# - 'web' (default, uses built in DB)
# - 'remote_user_guard' for Authelia etc
# https://docs.firefly-iii.org/advanced-installation/authentication
AUTHENTICATION_GUARD=web
AUTHENTICATION_GUARD_HEADER=REMOTE_USER
AUTHENTICATION_GUARD_EMAIL=
CUSTOM_LOGOUT_URL=
# You can disable the X-Frame-Options header if it interferes with tools like Organizr.
DISABLE_FRAME_HEADER=false
# You can disable the Content Security Policy header when you're using an ancient browser
DISABLE_CSP_HEADER=false
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
TRACKER_SITE_ID=
TRACKER_URL=
# Firefly III supports webhooks. These are security sensitive and must be enabled manually first.
ALLOW_WEBHOOKS=false
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
STATIC_CRON_TOKEN=
# You can fine tune the start-up of a Docker container by editing these environment variables.
DKR_BUILD_LOCALE=false
DKR_CHECK_SQLITE=true
DKR_RUN_MIGRATION=true
DKR_RUN_UPGRADE=true
DKR_RUN_VERIFY=true
DKR_RUN_REPORT=true
DKR_RUN_PASSPORT_INSTALL=true
# Leave the following configuration vars as is.
# Unless you like to tinker and know what you're doing.
APP_NAME=FireflyIII
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
CACHE_PREFIX=firefly
PUSHER_KEY=
IPINFO_TOKEN=
PUSHER_SECRET=
PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1

3
Firefly/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Firefly
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Firefly/status.svg)](https://drone.alexlebens.net/alexlebens/Firefly)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly MariaDB - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_mariadb",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly Server - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_server",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Firefly Plaid - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "firefly_plaid",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Firefly - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://firefly.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,87 @@
services:
mariadb:
container_name: firefly_mariadb
env_file:
- .env
image: mariadb
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.55
restart: always
volumes:
- db:/var/lib/mysql
server:
container_name: firefly_server
depends_on:
- 'mariadb'
env_file:
- .env
image: fireflyiii/core:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.firefly.entrypoints: websecure
traefik.http.routers.firefly.rule: Host(`firefly.alexlebens.net`)
traefik.http.routers.firefly.service: firefly
traefik.http.services.firefly.loadbalancer.server.port: 8080
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.56
restart: always
volumes:
- upload:/var/www/html/storage/upload
plaid_connector:
container_name: firefly_plaid
depends_on:
- 'server'
image: registry.gitlab.com/georgehahn/firefly-plaid-connector:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.57
restart: always
volumes:
- config:/config
networks:
traefik:
name: traefik
external: true
volumes:
db:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_db
upload:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_upload
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/firefly_config

110
Gitea/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Gitea
URL: gitea.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Gitea failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Gitea failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Gitea succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Gitea failed.
when:
status:
- failure

12
Gitea/.env Normal file
View File

@@ -0,0 +1,12 @@
POSTGRES_USER=gitea
POSTGRES_PASSWORD=gitea
POSTGRES_DB=gitea
USER_UID=1000
USER_GID=1000
GITEA__database__DB_TYPE=postgres
GITEA__database__HOST=gitea_postgres:5432
GITEA__database__NAME=gitea
GITEA__database__USER=gitea
GITEA__database__PASSWD=gitea
GITEA__webhook__ALLOWED_HOST_LIST="*.alexlebens.net, 192.168.1.*, 172.27.*"

3
Gitea/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Gitea
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Gitea/status.svg)](https://drone.alexlebens.net/alexlebens/Gitea)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Gitea - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://gitea.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "gitea",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Gitea Postgres - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://gitea.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "gitea_postgres",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Gitea - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://gitea.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

65
Gitea/docker-compose.yml Normal file
View File

@@ -0,0 +1,65 @@
services:
postgres:
container_name: gitea_postgres
env_file:
- .env
image: postgres:14
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
volumes:
- postgressql:/var/lib/postgresql/data
gitea:
container_name: gitea
depends_on:
- postgres
env_file:
- .env
extra_hosts:
- keycloak.alexlebens.net:192.168.1.15
image: gitea/gitea:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.gitea.entrypoints: websecure
traefik.http.routers.gitea.rule: Host(`gitea-old.alexlebens.net`)
traefik.http.routers.gitea.service: gitea
traefik.http.services.gitea.loadbalancer.server.port: 3000
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: always
volumes:
- gitea_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
traefik:
name: traefik
external: true
volumes:
postgressql:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/gitea_postgressql
gitea_data:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/gitea_data

110
Grafana/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Grafana
URL: grafana.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Grafana failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Grafana failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Grafana succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Grafana failed.
when:
status:
- failure

31
Grafana/.env Normal file
View File

@@ -0,0 +1,31 @@
PATH='/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
GF_PATHS_DATA='/var/lib/grafana'
GF_PATHS_LOGS='/var/log/grafana'
GF_PATHS_PLUGINS='/var/lib/grafana/plugins'
GF_PATHS_PROVISIONING='/etc/grafana/provisioning'
GF_SERVER_ROOT_URL='alexlebens.net'
GF_SERVER_ROOT_URL='https://grafana.alexlebens.net'
GF_USERS_AUTO_ASSIGN_ORG='true'
GF_USERS_AUTO_ASSIGN_ORG_ID='1'
GF_AUTH_LOGIN_COOKIE_NAME='grafana_session'
GF_AUTH_DISABLE_LOGIN_FORM='true'
GF_AUTH_OAUTH_AUTO_LOGIN='false'
GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP='true'
GF_AUTH_GENERIC_OAUTH_ENABLED='true'
GF_AUTH_GENERIC_OAUTH_NAME='Authentik'
GF_AUTH_GENERIC_OAUTH_CLIENT_ID='7811f038dc09d084b36c253d92d4164d1b9a2096'
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET='dbcef3c8baaf0fb038e2780ccbb2fc606d9a4f3ac5d55877b6d22d608ec995d300d5c269c51398063babdf226437caf87e345da87bc22f7cbc3d1d5c4f573b67'
GF_AUTH_GENERIC_OAUTH_SCOPES='openid email profile'
GF_AUTH_GENERIC_OAUTH_AUTH_URL='https://authentik.alexlebens.net/application/o/authorize/'
GF_AUTH_GENERIC_OAUTH_TOKEN_URL='https://authentik.alexlebens.net/application/o/token/'
GF_AUTH_GENERIC_OAUTH_API_URL='https://authentik.alexlebens.net/application/o/userinfo/'
GF_AUTH_SIGNOUT_REDIRECT_URL='https://authentik.alexlebens.net/application/o/grafana/end-session/'
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH="contains(realm_access.roles[*], 'Grafana Admins') && 'Admin' || contains(realm_access.roles[*], 'Grafana Editors') && 'Editor' || 'Viewer'"
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS='grafana-clock-panel,grafana-worldmap-panel,grafana-simple-json-datasource,grafana-piechart-panel'

3
Grafana/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Grafana
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Grafana/status.svg)](https://drone.alexlebens.net/alexlebens/Grafana)

Some files were not shown because too many files have changed in this diff Show More