init
This commit is contained in:
110
Calibre/.drone.yml
Normal file
110
Calibre/.drone.yml
Normal 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
3
Calibre/.env
Normal file
@@ -0,0 +1,3 @@
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
TZ=America/Denver
|
3
Calibre/README.md
Normal file
3
Calibre/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Calibre
|
||||
|
||||
[](https://drone.alexlebens.net/alexlebens/Calibre)
|
17
Calibre/UptimeKuma/docker-1.json
Normal file
17
Calibre/UptimeKuma/docker-1.json
Normal 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
|
||||
}
|
17
Calibre/UptimeKuma/docker-2.json
Normal file
17
Calibre/UptimeKuma/docker-2.json
Normal 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
|
||||
}
|
15
Calibre/UptimeKuma/http-1.json
Normal file
15
Calibre/UptimeKuma/http-1.json
Normal 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"
|
||||
]
|
||||
}
|
15
Calibre/UptimeKuma/http-2.json
Normal file
15
Calibre/UptimeKuma/http-2.json
Normal 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"
|
||||
]
|
||||
}
|
81
Calibre/docker-compose.yml
Normal file
81
Calibre/docker-compose.yml
Normal 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
|
Reference in New Issue
Block a user