add admin user logic

This commit is contained in:
vladp
2026-04-08 11:57:27 +07:00
parent feb8ab6b28
commit 91c85173e4
2 changed files with 3 additions and 9 deletions
+2 -8
View File
@@ -27,11 +27,6 @@ pipeline {
defaultValue: 'db',
description: 'Хост базы данных'
)
choice(
name: 'SPRING_PROFILE',
choices: ['dev', 'prod'],
description: 'Профиль Spring для запуска'
)
}
stages {
@@ -85,7 +80,6 @@ pipeline {
steps {
script {
def buildTime = sh(script: "TZ='Asia/Novosibirsk' date '+%d-%m-%Y %H:%M:%S'", returnStdout: true).trim()
def springProfile = params.SPRING_PROFILE
withCredentials([
usernamePassword(
credentialsId: 'server-root-password',
@@ -120,14 +114,14 @@ pipeline {
--network ${params.NETWORK} \\
--network-alias admin \\
--network-alias admin-${params.PORT} \\
-p ${params.PORT}:8082 \\
-p ${params.PORT}:${params.PORT} \\
-v uploads_data:/data/uploads:rw \\
-e POSTGRES_DB=no_copy_ \\
-e POSTGRES_USER=${DB_USER} \\
-e POSTGRES_PASSWORD=${DB_PASSWORD} \\
-e POSTGRES_PORT=5432 \\
-e POSTGRES_HOST=${params.DB_HOST} \\
-e SPRING_PROFILES_ACTIVE=${springProfile} \\
-e SERVER_PORT=${params.PORT} \\
-e BUILD_TIME='${buildTime}' \\
--restart unless-stopped \\
admin-panel-${params.PORT}:latest
+1 -1
View File
@@ -6,7 +6,7 @@ spring:
jpa:
hibernate:
ddl-auto: validate
ddl-auto: update
server:
port: 8082