diff --git a/infrastructure/jenkins/deploy-backend.groovy b/infrastructure/jenkins/deploy-backend.groovy index 07105f2..dfe82ec 100644 --- a/infrastructure/jenkins/deploy-backend.groovy +++ b/infrastructure/jenkins/deploy-backend.groovy @@ -78,7 +78,7 @@ 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 + def baseUrl = params.SPRING_PROFILE == 'prod' ? 'https://workspace.not-copy.com' : 'https://dev-workspace.not-copy.com' withCredentials([ usernamePassword( credentialsId: 'server-root-password', @@ -161,7 +161,7 @@ pipeline { -e POSTGRES_PORT=5432 \\ -e POSTGRES_HOST=no_copy_${params.PORT} \\ -e FILE_STORAGE_PATH=/data/uploads \\ - -e SPRING_PROFILES_ACTIVE=${springProfile} \\ + -e BASE_URL=${baseUrl} \\ app-backend-${params.PORT}:latest echo '8. Проверка...' diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index a696470..8d4a90f 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -75,7 +75,7 @@ security: server: port: ${SERVER_PORT:8080} - baseurl: ${BASE_URL:} + baseurl: ${BASE_URL} front: port: ":2998" tomcat: @@ -146,27 +146,3 @@ tarif: enterprice-disk-size: 500 enterprice-user-count: 80 ---- -spring: - config: - activate: - on-profile: dev -server: - baseurl: "https://dev-workspace.not-copy.com" - ---- -spring: - config: - activate: - on-profile: prod -server: - baseurl: "https://workspace.not-copy.com" - ---- -spring: - config: - activate: - on-profile: local -server: - baseurl: "http://localhost:8080" -