Skip to content

Commit b35f942

Browse files
committed
➖ Remove forever.js from the Dockerfile
1 parent c0c8751 commit b35f942

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ WORKDIR /iframely
99
ENV NODE_ENV=production
1010

1111
RUN apk add --no-cache git && \
12-
yarn add forever && \
1312
yarn install --frozen-lockfile --production
1413

1514
ENTRYPOINT [ "/iframely/docker/entrypoint.sh" ]

docker/entrypoint.sh

+2-26
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
#!/bin/ash
1+
#!/bin/sh
22

3-
export ARGV="$@"
4-
export ARGC="$#"
5-
6-
function sigterm_handler() {
7-
echo "SIGTERM signal received."
8-
yarn forever stopall
9-
}
10-
11-
trap "sigterm_handler; exit" TERM
12-
13-
function entrypoint() {
14-
if [ "$ARGC" -eq 0 ]
15-
then
16-
# Run server in cluster mode by default
17-
yarn forever start cluster.js
18-
else
19-
# Use command line arguments supplied at runtime
20-
yarn forever start $ARGV
21-
fi
22-
23-
yarn forever --fifo logs 0 &
24-
wait
25-
}
26-
27-
entrypoint
3+
exec node cluster.js

0 commit comments

Comments
 (0)