We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff27ae9 commit 384a9c7Copy full SHA for 384a9c7
Dockerfile
@@ -4,12 +4,11 @@ WORKDIR /app
4
5
COPY . .
6
7
+ENV HTTP_PORT=80 HTTPS_PORT=443
8
+
9
RUN npm install --production
10
11
RUN apk --no-cache add openssl && sh generate-cert.sh && rm -rf /var/cache/apk/*
12
-EXPOSE 80 443
-
13
14
ENTRYPOINT ["node", "./index.js"]
15
CMD []
index.js
@@ -59,8 +59,8 @@ const sslOpts = {
59
cert: require('fs').readFileSync('fullchain.pem'),
60
};
61
62
-var httpServer = http.createServer(app).listen(80);
63
-var httpsServer = https.createServer(sslOpts,app).listen(443);
+var httpServer = http.createServer(app).listen(process.env.HTTP_PORT || 80);
+var httpsServer = https.createServer(sslOpts,app).listen(process.env.HTTPS_PORT || 443);
64
65
let calledClose = false;
66
0 commit comments