Added silent removal of existing containers #71
@@ -107,6 +107,8 @@ steps:
|
||||
from_secret: ssh_password
|
||||
script:
|
||||
- docker pull khwezi/webapitest:latest
|
||||
- docker stop webapi 2>NUL || echo "Container not running"
|
||||
- docker rm webapi 2>NUL || echo "Container not found"
|
||||
- docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Development -p 4000:8081 khwezi/webapitest:latest
|
||||
|
||||
---
|
||||
@@ -132,6 +134,8 @@ steps:
|
||||
settings:
|
||||
script:
|
||||
- docker pull khwezi/webapitest:latest
|
||||
- docker stop webapi 2>NUL || echo "Container not running"
|
||||
- docker rm webapi 2>NUL || echo "Container not found"
|
||||
- docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Production -p 4001:8081 khwezi/webapitest:latest
|
||||
when:
|
||||
event:
|
||||
|
||||
Reference in New Issue
Block a user