feat: switch to multi instance automated by jenkins
Some checks failed
jenkins-ci Build failed

This commit is contained in:
2026-01-23 13:33:28 +00:00
parent 9d5cced7d6
commit 6a45548a62
2 changed files with 13 additions and 5 deletions

12
Jenkinsfile vendored
View File

@@ -1,9 +1,14 @@
pipeline { pipeline {
agent any agent any
parameters {
choice(name: 'USER_NAME', choices: ['lucas', 'cyrus'], description: 'Quelle instance déployer ?')
}
environment { environment {
GITEA_REPO_PATH = "lucas/uptime-kuma" GITEA_REPO_PATH = "lucas/uptime-kuma"
GITEA_API_URL = "https://gitea.lucasroyer.fr/api/v1" GITEA_API_URL = "https://gitea.lucasroyer.fr/api/v1"
DOCKER_HOST = "unix:///run/user/1001/docker.sock"
} }
stages { stages {
@@ -14,8 +19,11 @@ pipeline {
} }
stage('Deploy') { stage('Deploy') {
steps { steps {
echo "Deploy new kuma..." echo "Deploy new kuma for ${params.USER_NAME}..."
sh "docker compose up -d --remove-orphans" sh """
USER_NAME=${params.USER_NAME} \
docker compose -p ${params.USER_NAME} up -d --force-recreate --remove-orphans
"""
} }
} }
} }

View File

@@ -1,16 +1,16 @@
services: services:
uptime-kuma: uptime-kuma:
image: louislam/uptime-kuma:2.0.2-slim image: louislam/uptime-kuma:2.0.2-slim
container_name: uptime-kuma container_name: uptime-kuma-${USER_NAME}
restart: always restart: always
volumes: volumes:
- uptime_kuma_data:/app/data - kuma_${USER_NAME}:/app/data
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
networks: networks:
- reverse-proxy - reverse-proxy
volumes: volumes:
uptime_kuma_data: kuma_${USER_NAME}:
external: true external: true
networks: networks: