Skip to content

Commit

Permalink
build: restart service
Browse files Browse the repository at this point in the history
  • Loading branch information
Faulo committed Sep 21, 2024
1 parent 2406081 commit c847381
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Jenkinsfile.Docker
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ pipeline {
withEnv(readFile('.env').split('\n') as List) {
dir("/var/vhosts/$STACK_NAME") {
checkout scm
sh "docker stack deploy $STACK_NAME --detach=true --prune --resolve-image=always -c=docker-compose.yml"
def service = env.STACK_NAME + '_' + env.STACK_NAME
unstash 'lock'
sh 'docker exec $(docker ps -q -f name=' + env.STACK_NAME + '_' + env.STACK_NAME + ') composer install --no-interaction --no-dev'
sh "docker stack deploy $STACK_NAME --detach=true --prune --resolve-image=never -c=docker-compose.yml"
sh "docker service update --force " + service
//sh 'docker exec $(docker ps -q -f name=' + env.STACK_NAME + '_' + env.STACK_NAME + ') composer install --no-interaction --no-dev'
}
}
}
Expand Down

0 comments on commit c847381

Please sign in to comment.