File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,10 @@ RUN yarn install --frozen-lockfile --production
22
22
23
23
FROM base AS production
24
24
COPY --from=prod-dependencies /root/cf-runtime/node_modules ./node_modules
25
- COPY --from=build /root/cf-runtime/dist ./dist
26
- COPY . .
25
+ COPY --from=build /root/cf-runtime/dist ./lib
27
26
28
27
# purpose of security
29
28
RUN npm -g uninstall npm
30
29
31
30
USER cfu
32
- CMD ["node" , "dist /index.js" ]
31
+ CMD ["node" , "lib /index.js" ]
Original file line number Diff line number Diff line change 1
1
while ($true ) {
2
2
Start-Sleep - s 1
3
- & node dist / index.js
3
+ & node lib / index.js
4
4
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function isContainerLoggerReady(state) {
23
23
24
24
( ( ) => {
25
25
const containerId = process . argv [ 2 ] ;
26
- const state = JSON . parse ( readFileSync ( './dist /state.json' ) . toString ( 'utf-8' ) ) ;
26
+ const state = JSON . parse ( readFileSync ( './lib /state.json' ) . toString ( 'utf-8' ) ) ;
27
27
let isReady = false ;
28
28
if ( containerId ) {
29
29
isReady = isContainerReady ( state , containerId ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ $CONTAINER_ID=$args[0]
6
6
7
7
if ( $CONTAINER_ID ) {
8
8
echo " checking if container:$CONTAINER_ID exists"
9
- if (select-string - Pattern $CONTAINER_ID - Path ./ dist / state.json) {
9
+ if (select-string - Pattern $CONTAINER_ID - Path ./ lib / state.json) {
10
10
echo " container $CONTAINER_ID is ready"
11
11
Exit 0
12
12
} else {
@@ -15,7 +15,7 @@ if ( $CONTAINER_ID ) {
15
15
}
16
16
} else {
17
17
echo " checking if container logger is ready"
18
- if (select-string - Pattern " ready" - Path ./ dist / state.json) {
18
+ if (select-string - Pattern " ready" - Path ./ lib / state.json) {
19
19
echo " ready"
20
20
Exit 0
21
21
} else {
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ CONTAINER_ID=$1
7
7
8
8
if [ -n " $CONTAINER_ID " ]; then
9
9
echo " checking if container: $CONTAINER_ID exists"
10
- grep -q $CONTAINER_ID ./dist /state.json
10
+ grep -q $CONTAINER_ID ./lib /state.json
11
11
else
12
12
echo " checking if container logger is ready"
13
- grep -q " ready" ./dist /state.json
13
+ grep -q " ready" ./lib /state.json
14
14
fi
15
15
16
16
Original file line number Diff line number Diff line change 53
53
"test:ci" : " yarn test" ,
54
54
"start" : " node dist/index.js" ,
55
55
"version" : " exit 0" ,
56
- "build" : " rm -rf dist && tsc -p tsconfig.json"
56
+ "build" : " rm -rf dist && tsc -p tsconfig.json && yarn run build:copy-scripts" ,
57
+ "build:copy-scripts" : " cp ./lib/*.sh ./lib/*.ps1 ./dist"
57
58
}
58
59
}
You can’t perform that action at this time.
0 commit comments