define port in environment variable
This commit is contained in:
parent
dd183a3b42
commit
04525df9fa
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
ARG PORT=3000
|
||||
ENV PORT=$PORT
|
||||
# Use the official lightweight Node.js 12 image.
|
||||
# https://hub.docker.com/_/node
|
||||
FROM node:12-alpine
|
||||
|
@ -11,6 +13,6 @@ COPY / ./
|
|||
RUN npm install
|
||||
# Compile to production
|
||||
RUN npm run build
|
||||
EXPOSE 3000
|
||||
EXPOSE ${PORT}
|
||||
# Run the web service on container startup.
|
||||
CMD [ "npm", "start" ]
|
Loading…
Add table
Add a link
Reference in a new issue