File tree Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -52,24 +52,13 @@ const appPath = "~/app";
5252const sshPrefix =
5353 "ssh -o StrictHostKeyChecking=no " + ( sshKeyPath ? `-i ${ sshKeyPath } ` : "" ) + sshServer + " " ;
5454
55- // todo-ZM: let docker-compose handle deletion of old containers
56- // Check for existing containers
57- logs = execSync ( sshPrefix + '"sudo docker ps -aq"' ) ;
58-
59- if ( String ( logs ) ) {
60- // stop containers
61- console . log ( "⚠️ Stopping all containers ..." ) ;
62- logs = execSync ( sshPrefix + '"sudo docker stop \\$(sudo docker ps -aq)"' ) ;
63- console . log ( String ( logs ) ) ;
55+ console . log ( "⚠️ Cleaning up old containers ..." ) ;
56+ logs = execSync ( sshPrefix + '"sudo docker container prune --force"' ) ;
57+ console . log ( String ( logs ) ) ;
6458
65- // delete containers
66- console . log ( "⚠️ Deleting all containers ..." ) ;
67- logs = execSync ( sshPrefix + '"sudo docker rm \\$(sudo docker ps -aq)"' ) ;
68- console . log ( String ( logs ) ) ;
69- console . log ( "✅ All containers stopped" ) ;
70- } else {
71- console . log ( "⏩ No container found, skipping stopping containers." ) ;
72- }
59+ console . log ( "⚠️ Cleaning up old images ..." ) ;
60+ logs = execSync ( sshPrefix + '"sudo docker image prune --force"' ) ;
61+ console . log ( String ( logs ) ) ;
7362
7463console . log ( "⚠️ Deleting old code ..." ) ;
7564logs = execSync ( sshPrefix + '"rm -f -r ' + appPath + '"' ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ services:
1313 build : " ."
1414 ports :
1515 - " 7070:7070"
16+ depends_on :
17+ postgres :
18+ condition : service_started
19+ meilisearch :
20+ condition : service_started
1621 env_file :
1722 - /home/ubuntu/app-env/api.env
1823 volumes :
@@ -28,7 +33,7 @@ services:
2833 POSTGRES_HOST_AUTH_METHOD : trust
2934 POSTGRES_DB : db
3035 meilisearch :
31- image : getmeili/meilisearch:latest
36+ image : getmeili/meilisearch:v1.11.3
3237 ports :
3338 - " 7700:7700"
3439 volumes :
You can’t perform that action at this time.
0 commit comments