Redeploy Uptime-Kuma via CI

This commit is contained in:
Colin 2024-03-19 14:27:58 -04:00
parent 900d22bb29
commit e477245786
10 changed files with 66 additions and 119 deletions

View File

@ -1,2 +1 @@
<!-- build 0 -->
Theres lots of settings for making it look nice but I just got the basics laid out and the uploads directory needs to be looked at and its file perms.
<!-- build 0 -->

View File

@ -1,7 +1,7 @@
version: "3.9"
services:
send:
uptime:
build:
context: docker/send
context: docker/uptime
dockerfile: Dockerfile.production
image: git.nixc.us/nixius/send:production-web
image: git.nixc.us/nixius/uptime:production

View File

@ -1,6 +1,6 @@
version: "3.9"
services:
send:
uptime:
build:
context: docker/send
image: git.nixc.us/nixius/send:staging-web
context: docker/uptime
image: git.nixc.us/nixius/uptime:staging

View File

@ -1 +0,0 @@
# TODO: Deploy a static version of redis maybe for what its worth.

View File

@ -1 +0,0 @@
FROM registry.gitlab.com/timvisee/send:latest

View File

@ -1 +0,0 @@
FROM git.nixc.us/nixius/send:staging-web

1
docker/uptime/Dockerfile Normal file
View File

@ -0,0 +1 @@
FROM louislam/uptime-kuma:latest

View File

@ -0,0 +1 @@
FROM git.nixc.us/nixius/uptime:staging

View File

@ -1,61 +1,34 @@
version: "3.7"
services:
uptime:
image: git.nixc.us/nixius/uptime:production
volumes:
- "/root/tank/persist/nixc.us/uptime-kuma/production/data:/app/data"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
deploy:
replicas: 1
placement:
constraints:
- node.hostname == ingress.nixc.us
labels:
- "us.nixc.autodeploy=true"
- "traefik.enable=true"
- "traefik.http.routers.production_uptime-kuma_uptime.tls=true"
- "traefik.http.services.production_uptime-kuma_uptime.loadbalancer.server.port=3001"
- "traefik.http.routers.production_uptime-kuma_uptime.rule=Host(`uptime.nixc.us`)"
- "traefik.http.routers.production_uptime-kuma_uptime.entrypoints=websecure"
- "traefik.http.routers.production_uptime-kuma_uptime.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.production_uptime-kuma_uptime.service=production_uptime-kuma_uptime"
- "traefik.docker.network=traefik"
# - 'traefik.http.routers.production_uptime-kuma_uptime.middlewares=authelia@docker'
networks:
- traefik
- socketproxy
dns:
- 8.8.8.8
- 4.4.4.4
networks:
traefik:
external: true
default:
services:
web:
image: git.nixc.us/nixius/send:production-web
depends_on:
- redis
environment:
REDIS_HOST: send_redis
FILE_DIR: /uploads
DETECT_BASE_URL: "true"
MAX_FILE_SIZE: 4294967296 # 2147483648 #4,294,967,296
MAX_FILES_PER_ARCHIVE: 64
MAX_DOWNLOADS: 5
DOWNLOAD_COUNTS: "2,1,2,5"#,10,15,25,50,100,1000"
EXPIRE_TIMES_SECONDS: "3600,86400,604800,2592000,31536000"
DEFAULT_DOWNLOADS: "1"
DEFAULT_EXPIRE_SECONDS: "86400"
volumes:
- /mnt/tank/persist/nixc.us/send/production/uploads:/uploads
networks:
- default
- traefik
deploy:
replicas: 1
placement:
constraints:
- node.hostname == macmini8
labels:
- "traefik.enable=true"
- "traefik.http.routers.production_send_web.tls=true"
- "traefik.http.services.production_send_web.loadbalancer.server.port=1443"
- "traefik.http.routers.production_send_web.rule=Host(`send.nixc.us`)"
- "traefik.http.routers.production_send_web.entrypoints=websecure"
- "traefik.http.routers.production_send_web.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.production_send_web.service=production_send_web"
- "traefik.docker.network=traefik"
networks:
- traefik
- default
redis:
image: redis:alpine
networks:
- default
redis:
image: redis
deploy:
replicas: 1
placement:
constraints:
- node.hostname == macmini8
labels:
- traefik.enable=false
volumes:
- /mnt/tank/persist/nixc.us/send/production/db:/data
networks:
- default
entrypoint: redis-server
socketproxy:
external: true

View File

@ -1,55 +1,31 @@
version: "3.7"
services:
uptime:
image: git.nixc.us/nixius/uptime:staging
deploy:
replicas: 1
placement:
constraints:
- node.hostname == ingress.nixc.us
labels:
- "us.nixc.autodeploy=true"
- "traefik.enable=true"
- "traefik.http.routers.staging_uptime-kuma_uptime.tls=true"
- "traefik.http.services.staging_uptime-kuma_uptime.loadbalancer.server.port=3001"
- "traefik.http.routers.staging_uptime-kuma_uptime.rule=Host(`staging.uptime.nixc.us`)"
- "traefik.http.routers.staging_uptime-kuma_uptime.entrypoints=websecure"
- "traefik.http.routers.staging_uptime-kuma_uptime.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.staging_uptime-kuma_uptime.service=staging_uptime-kuma_uptime"
- "traefik.docker.network=traefik"
# - 'traefik.http.routers.uptime-kuma_uptime.middlewares=authelia@docker'
networks:
- traefik
- socketproxy
dns:
- 8.8.8.8
- 4.4.4.4
networks:
traefik:
external: true
default:
services:
web:
image: git.nixc.us/nixius/send:staging-web
depends_on:
- redis
environment:
REDIS_HOST: send_redis
FILE_DIR: /uploads
DETECT_BASE_URL: "true"
MAX_FILE_SIZE: 4294967296 # 2147483648 #4,294,967,296
MAX_FILES_PER_ARCHIVE: 64
MAX_DOWNLOADS: 20
DOWNLOAD_COUNTS: "2,1,2,5,10,15,25,50,100,1000"
EXPIRE_TIMES_SECONDS: "3600,86400,604800,2592000,31536000"
DEFAULT_DOWNLOADS: "1"
DEFAULT_EXPIRE_SECONDS: "86400"
# volumes:
# - /mnt/tank/persist/aenow.com/send/staging/uploads:/uploads
networks:
- default
- traefik
deploy:
replicas: 1
labels:
- "traefik.enable=true"
- "traefik.http.routers.staging_send_web.tls=true"
- "traefik.http.services.staging_send_web.loadbalancer.server.port=1443"
- "traefik.http.routers.staging_send_web.rule=Host(`staging.send.aenow.com`)"
- "traefik.http.routers.staging_send_web.entrypoints=websecure"
- "traefik.http.routers.staging_send_web.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.staging_send_web.service=staging_send_web"
- "traefik.docker.network=traefik"
networks:
- traefik
- default
redis:
image: redis:alpine
networks:
- default
redis:
image: redis
deploy:
replicas: 1
labels:
- traefik.enable=false
# volumes:
# - /mnt/tank/persist/nixc.us/send/staging/db:/data
networks:
- default
entrypoint: redis-server
socketproxy:
external: true