File tree 2 files changed +12
-18
lines changed
2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -52,24 +52,13 @@ const appPath = "~/app";
52
52
const sshPrefix =
53
53
"ssh -o StrictHostKeyChecking=no " + ( sshKeyPath ? `-i ${ sshKeyPath } ` : "" ) + sshServer + " " ;
54
54
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 ) ) ;
64
58
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 ) ) ;
73
62
74
63
console . log ( "⚠️ Deleting old code ..." ) ;
75
64
logs = execSync ( sshPrefix + '"rm -f -r ' + appPath + '"' ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ services:
13
13
build : " ."
14
14
ports :
15
15
- " 7070:7070"
16
+ depends_on :
17
+ postgres :
18
+ condition : service_started
19
+ meilisearch :
20
+ condition : service_started
16
21
env_file :
17
22
- /home/ubuntu/app-env/api.env
18
23
volumes :
@@ -28,7 +33,7 @@ services:
28
33
POSTGRES_HOST_AUTH_METHOD : trust
29
34
POSTGRES_DB : db
30
35
meilisearch :
31
- image : getmeili/meilisearch:latest
36
+ image : getmeili/meilisearch:v1.11.3
32
37
ports :
33
38
- " 7700:7700"
34
39
volumes :
You can’t perform that action at this time.
0 commit comments