init
This commit is contained in:
110
UptimeKuma/.drone.yml
Normal file
110
UptimeKuma/.drone.yml
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy
|
||||
|
||||
environment:
|
||||
PACKAGE: UptimeKuma
|
||||
URL: uptimekuma.alexlebens.net uptimekumaapi.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 UptimeKuma 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 UptimeKuma 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 UptimeKuma 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 UptimeKuma failed.
|
||||
when:
|
||||
status:
|
||||
- failure
|
3
UptimeKuma/README.md
Normal file
3
UptimeKuma/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# UptimeKuma
|
||||
|
||||
[](https://drone.alexlebens.net/alexlebens/UptimeKuma)
|
17
UptimeKuma/UptimeKuma/docker-1.json
Normal file
17
UptimeKuma/UptimeKuma/docker-1.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "docker",
|
||||
"name": "UptimeKuma - Docker",
|
||||
"interval": 60,
|
||||
"retryInterval": 20,
|
||||
"maxretries": 1,
|
||||
"notificationIDList": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"url": "https://uptimekuma.alexlebens.net",
|
||||
"accepted_statuscodes": [
|
||||
"200-299"
|
||||
],
|
||||
"docker_container": "uptimekuma",
|
||||
"docker_host": 1
|
||||
}
|
17
UptimeKuma/UptimeKuma/docker-2.json
Normal file
17
UptimeKuma/UptimeKuma/docker-2.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "docker",
|
||||
"name": "UptimeKuma API - Docker",
|
||||
"interval": 60,
|
||||
"retryInterval": 20,
|
||||
"maxretries": 1,
|
||||
"notificationIDList": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"url": "https://uptimekumaapi.alexlebens.net",
|
||||
"accepted_statuscodes": [
|
||||
"200-299"
|
||||
],
|
||||
"docker_container": "uptimekuma_api",
|
||||
"docker_host": 1
|
||||
}
|
15
UptimeKuma/UptimeKuma/http-1.json
Normal file
15
UptimeKuma/UptimeKuma/http-1.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "http",
|
||||
"name": "UptimeKuma API - Web",
|
||||
"interval": 60,
|
||||
"retryInterval": 20,
|
||||
"maxretries": 1,
|
||||
"notificationIDList": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"url": "https://uptimekumaapi.alexlebens.net",
|
||||
"accepted_statuscodes": [
|
||||
"200-299"
|
||||
]
|
||||
}
|
73
UptimeKuma/docker-compose.yml
Normal file
73
UptimeKuma/docker-compose.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
services:
|
||||
uptimekuma:
|
||||
container_name: uptimekuma
|
||||
image: louislam/uptime-kuma:latest
|
||||
labels:
|
||||
traefik.docker.network: traefik
|
||||
traefik.enable: true
|
||||
traefik.http.routers.uptimekuma.entrypoints: websecure
|
||||
traefik.http.routers.uptimekuma.rule: Host(`uptimekuma.alexlebens.net`)
|
||||
traefik.http.routers.uptimekuma.service: uptimekuma
|
||||
traefik.http.services.uptimekuma.loadbalancer.server.port: 3001
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 50m
|
||||
max-file: "3"
|
||||
networks:
|
||||
traefik: null
|
||||
restart: always
|
||||
privileged: true
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- app:/app/data
|
||||
|
||||
uptimekuma_api:
|
||||
container_name: uptimekuma_api
|
||||
depends_on:
|
||||
- uptimekuma
|
||||
environment:
|
||||
KUMA_SERVER: http://uptimekuma:3001
|
||||
KUMA_USERNAME: admin
|
||||
KUMA_PASSWORD: 24wrsfxv@$$WRSFXV
|
||||
ADMIN_PASSWORD: admin
|
||||
image: medaziz11/uptimekuma_restapi:latest
|
||||
labels:
|
||||
traefik.docker.network: traefik
|
||||
traefik.enable: true
|
||||
traefik.http.routers.uptimekuma_api.entrypoints: websecure
|
||||
traefik.http.routers.uptimekuma_api.rule: Host(`uptimekumaapi.alexlebens.net`)
|
||||
traefik.http.routers.uptimekuma_api.service: uptimekuma_api
|
||||
traefik.http.services.uptimekuma_api.loadbalancer.server.port: 8000
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 50m
|
||||
max-file: "3"
|
||||
mem_limit: 1g
|
||||
networks:
|
||||
traefik: null
|
||||
restart: always
|
||||
privileged: true
|
||||
volumes:
|
||||
- db:/db
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
name: traefik
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
app:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /var/lib/docker/volumes/partition/uptimekuma_app
|
||||
|
||||
db:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /var/lib/docker/volumes/partition/uptimekuma_db
|
Reference in New Issue
Block a user