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

4
Vikunja/.db.env Normal file
View File

@@ -0,0 +1,4 @@
MYSQL_ROOT_PASSWORD=supersupersecret
MYSQL_USER=vikunja
MYSQL_PASSWORD=supersecret
MYSQL_DATABASE=vikunja

110
Vikunja/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Vikunja
URL: vikunja.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 Vikunja 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 Vikunja 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 Vikunja 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 Vikunja failed.
when:
status:
- failure

7
Vikunja/.env Normal file
View File

@@ -0,0 +1,7 @@
VIKUNJA_DATABASE_HOST='vikunja_mariadb'
VIKUNJA_DATABASE_PASSWORD='supersecret'
VIKUNJA_DATABASE_TYPE='mysql'
VIKUNJA_DATABASE_USER='vikunja'
VIKUNJA_DATABASE_DATABASE='vikunja'
VIKUNJA_SERVICE_JWTSECRET='24wrsfxv@$WRSFXV'
VIKUNJA_SERVICE_FRONTENDURL='https://vikunja.alexlebens.net/'

View File

@@ -0,0 +1,11 @@
auth:
local:
enabled: disabled
openid:
enabled: true
redirecturl: https://vikunja.alexlebens.net/auth/openid/
providers:
- name: authentik
authurl: https://authentik.alexlebens.net/application/o/vikunja/
clientid: 6b6e3f8fb3e530a7df4acc3ebdbad6633ca1c122
clientsecret: ebaaac1145eb594817cc7d89d7d0e02832f0356a4d60b61da092cc5df6b8ff0f675df764e9397333a6a4650771fc008966ea4fef487035d5c89d40d1b0868ec6

3
Vikunja/README.md Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

106
Vikunja/docker-compose.yml Normal file
View File

@@ -0,0 +1,106 @@
services:
mariadb:
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --max-connections=1000
container_name: vikunja_mariadb
env_file:
- .db.env
image: mariadb:10
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.75
restart: always
volumes:
- db:/data/db
- dbvar:/var/lib/mysql
api:
container_name: vikunja_api
depends_on:
- mariadb
env_file:
- .env
image: vikunja/api
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.vikunja-api.entrypoints: websecure
traefik.http.routers.vikunja-api.rule: Host(`vikunja.alexlebens.net`) && PathPrefix(`/api/v1`, `/dav/`, `/.well-known/`)
traefik.http.routers.vikunja-api.service: vikunja-api
traefik.http.services.vikunja-api.loadbalancer.server.port: 3456
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.76
restart: always
privileged: true
volumes:
- files:/app/vikunja/files
- config:/app/vikunja/.config
frontend:
container_name: vikunja_frontend
environment:
VIKUNJA_API_URL: https://vikunja.alexlebens.net/api/v1
image: vikunja/frontend
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.vikunja.entrypoints: websecure
traefik.http.routers.vikunja.rule: Host(`vikunja.alexlebens.net`)
traefik.http.routers.vikunja.service: vikunja
traefik.http.services.vikunja.loadbalancer.server.port: 80
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik:
ipv4_address: 172.27.1.77
restart: unless-stopped
networks:
traefik:
name: traefik
external: true
volumes:
db:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/vikunja_db
dbvar:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/vikunja_dbvar
files:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/vikunja_files
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/vikunja_config