working directory
This commit is contained in:
parent
8e1fcef0a7
commit
6466c6cad6
@ -4,6 +4,7 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
WorkingDirectory=/home/$REPO_NAME/dist/
|
||||||
ExecStart=/home/$REPO_NAME/dist/$REPO_NAME
|
ExecStart=/home/$REPO_NAME/dist/$REPO_NAME
|
||||||
ExecReload=/bin/kill -s HUP $MAINPID
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
|
@ -2,6 +2,7 @@ namespace $REPO_NAME
|
|||||||
{
|
{
|
||||||
public class Configuration
|
public class Configuration
|
||||||
{
|
{
|
||||||
|
public string urls { get; set; }
|
||||||
public string DBConnectionString { get; set; }
|
public string DBConnectionString { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -47,7 +47,7 @@ pipeline {
|
|||||||
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
|
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
|
||||||
{
|
{
|
||||||
sh """#!/bin/bash
|
sh """#!/bin/bash
|
||||||
ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user stop $$REPO_NAME'
|
ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user stop $REPO_NAME'
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,9 +63,7 @@ pipeline {
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
sh """#!/bin/bash
|
sh """#!/bin/bash
|
||||||
pushd dist
|
|
||||||
dotnet ef database update --connection "$${env.productiondatabase_connectionString}"
|
dotnet ef database update --connection "$${env.productiondatabase_connectionString}"
|
||||||
popd
|
|
||||||
"""
|
"""
|
||||||
//TODO: if updating the db fails, restore the old one
|
//TODO: if updating the db fails, restore the old one
|
||||||
sh """#!/bin/bash
|
sh """#!/bin/bash
|
||||||
@ -95,7 +93,7 @@ pipeline {
|
|||||||
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
|
withCredentials([sshUserPrivateKey(credentialsId: env.linuxServiceAccountID, keyFileVariable: 'PK')])
|
||||||
{
|
{
|
||||||
sh """#!/bin/bash
|
sh """#!/bin/bash
|
||||||
ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user start $$REPO_NAME'
|
ssh -i \"$${PK}\" -tt $${linuxServiceAccount_USR}@$${targetHost} 'systemctl --user start $REPO_NAME'
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,6 @@
|
|||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"urls": "http://0.0.0.0:0;",
|
||||||
"DBConnectionString": "Host=localhost;Database=${REPO_NAME}_dev;Username=$REPO_NAME;Password=wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV;IncludeErrorDetail=true;"
|
"DBConnectionString": "Host=localhost;Database=${REPO_NAME}_dev;Username=$REPO_NAME;Password=wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV;IncludeErrorDetail=true;"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user