File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,11 @@ WORKDIR /app
44
55COPY . .
66
7+ ENV HTTP_PORT=80 HTTPS_PORT=443
8+
79RUN npm install --production
810
911RUN apk --no-cache add openssl && sh generate-cert.sh && rm -rf /var/cache/apk/*
1012
11- EXPOSE 80 443
12-
13-
1413ENTRYPOINT ["node" , "./index.js" ]
1514CMD []
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ const sslOpts = {
5959 cert : require ( 'fs' ) . readFileSync ( 'fullchain.pem' ) ,
6060} ;
6161
62- var httpServer = http . createServer ( app ) . listen ( 80 ) ;
63- var httpsServer = https . createServer ( sslOpts , app ) . listen ( 443 ) ;
62+ var httpServer = http . createServer ( app ) . listen ( process . env . HTTP_PORT || 80 ) ;
63+ var httpsServer = https . createServer ( sslOpts , app ) . listen ( process . env . HTTPS_PORT || 443 ) ;
6464
6565let calledClose = false ;
6666
You can’t perform that action at this time.
0 commit comments