update
dongho-repo/worldcup2026/pipeline/head There was a failure building this commit

This commit is contained in:
Dongho Kim
2026-06-07 00:34:52 +02:00
parent bbb6fe64b9
commit f83fe07553
2 changed files with 59 additions and 2 deletions
Vendored
+39
View File
@@ -0,0 +1,39 @@
pipeline {
agent {
node {
label 'dongho' // Runs the deployment on the 'dongho' agent
}
}
environment {
// Prepend common docker install paths to the environment PATH
PATH = "/usr/local/bin:/usr/bin:/bin:${env.PATH}"
}
stages {
stage('Checkout') {
steps {
// Diagnostics to check if group_add is active
sh 'whoami && id && ls -lh /var/run/docker.sock || true'
// Pulls the latest changes from the Git repository
checkout scm
}
}
stage('Build & Deploy') {
steps {
echo 'Building Docker image and starting service...'
// Build the image and recreate container with minimal downtime
sh 'docker compose up -d --build --remove-orphans'
}
}
}
post {
always {
// Clean up the temporary Jenkins workspace since the files are baked into the image
cleanWs()
}
}
}
+20 -2
View File
@@ -1,5 +1,3 @@
version: '3.8'
services:
worldcup-app:
build:
@@ -11,3 +9,23 @@ services:
restart: unless-stopped
environment:
- NODE_ENV=production
networks:
- proxy
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.worldcup26.entrypoints=http
- traefik.http.routers.worldcup26.rule=Host(`worldcup26.dongho.kim`)
- traefik.http.middlewares.worldcup26-redirect.redirectscheme.permanent=true
- traefik.http.middlewares.worldcup26-redirect.redirectscheme.scheme=https
- traefik.http.routers.worldcup26.middlewares=worldcup26-redirect
- traefik.http.routers.worldcup26-secure.entrypoints=https
- traefik.http.routers.worldcup26-secure.rule=Host(`worldcup26.dongho.kim`)
- traefik.http.routers.worldcup26-secure.tls=true
- traefik.http.routers.worldcup26-secure.tls.certresolver=cloudflare
- traefik.http.services.worldcup26-secure-service.loadbalancer.server.port=80
networks:
proxy:
external: true