File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ FROM node:20
22# Create app directory
33WORKDIR /usr/src/repo
44
5- # copy app bundle
5+ # must run with: docker compose build --build-arg CACHEBUST=$(date +%s)
6+ ARG CACHEBUST=1
7+
8+ # This COPY step will never use cache because of the ARG reference above
69COPY . ./
710
811RUN pwd
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ console.log(String(logs));
6565
6666console . log ( "⚠️ Deleting old code ..." ) ;
6767logs = execSync ( sshPrefix + '"rm -f -r ' + appPath + '"' ) ;
68+ console . log ( String ( logs ) ) ;
6869logs = execSync ( sshPrefix + '"mkdir ' + appPath + '"' ) ;
70+ console . log ( String ( logs ) ) ;
6971
7072console . log ( "⤴️ Uploading new code ..." ) ;
7173logs = execSync (
@@ -76,7 +78,13 @@ logs = execSync(
7678 ":" +
7779 appPath ,
7880) ;
79- console . log ( "✅ New code uploaded." ) ;
81+ console . log ( String ( logs ) ) ;
82+
83+ console . log ( "⚙️ Rebuilding docker images ..." ) ;
84+ logs = execSync (
85+ sshPrefix + '"cd ' + appPath + ' && docker compose build --build-arg CACHEBUST=$(date +%s)"' ,
86+ ) ;
87+ console . log ( String ( logs ) ) ;
8088
8189console . log ( "\n⚙️ Starting up the app" ) ;
8290logs = execSync (
You can’t perform that action at this time.
0 commit comments