From 730952006364fb2b1303b20dbc46ec6b5cf208a3 Mon Sep 17 00:00:00 2001 From: xiaozhou233 Date: Mon, 10 Aug 2026 18:54:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20Dockerfile?= =?UTF-8?q?=E3=80=81docker-compose=20=E5=92=8C=20nginx=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BB=A5=E6=94=AF=E6=8C=81=E5=89=8D=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=92=8C=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 74 ++++++----------------------------------- dashboard/.dockerignore | 2 ++ dashboard/Dockerfile | 22 ++++++++++++ dashboard/nginx.conf | 29 ++++++++++++++++ docker-compose.yml | 25 ++++++++++++++ 5 files changed, 88 insertions(+), 64 deletions(-) create mode 100644 dashboard/.dockerignore create mode 100644 dashboard/Dockerfile create mode 100644 dashboard/nginx.conf create mode 100644 docker-compose.yml diff --git a/Jenkinsfile b/Jenkinsfile index c658940..1563684 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,6 @@ pipeline { agent any - tools { - nodejs 'nodejs' - } - -environment { - DEPLOY_DIR = '/opt/1panel/www/sites/workstation.xiaozhou233.cn/index' -} - options { timestamps() disableConcurrentBuilds() @@ -30,66 +22,21 @@ environment { } } - stage('Install') { + stage('Build Images') { steps { - // Install frontend dependencies - dir('dashboard') { - sh 'npm ci' + script { + env.BUILD_TIME = sh(script: "date '+%Y-%m-%d %H:%M:%S'", returnStdout: true).trim() + env.COMMIT_SHORT = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim() } - } - } - - stage('Build') { - steps { - // Build frontend - dir('dashboard') { - sh 'npm run build' - } - } - } - - stage('Version') { - steps { - dir('dashboard') { - sh ''' -cat > dist/version.json <