2020-05-24 15:06:47 +02:00
|
|
|
# Get current image of node.js
|
2020-05-24 22:34:58 +02:00
|
|
|
FROM node:current-alpine
|
2020-05-24 15:06:47 +02:00
|
|
|
|
|
|
|
# Set /app as directory where the app should be at
|
2020-05-20 18:46:58 +02:00
|
|
|
WORKDIR /app
|
2020-05-24 15:06:47 +02:00
|
|
|
|
|
|
|
# Copy all of the relevant files over to the container
|
2020-05-20 18:46:58 +02:00
|
|
|
COPY . .
|
2020-05-24 15:06:47 +02:00
|
|
|
|
2020-05-24 22:03:51 +02:00
|
|
|
# Download dependencies, build application
|
2020-05-20 18:46:58 +02:00
|
|
|
RUN yarn
|
2020-05-24 15:06:47 +02:00
|
|
|
RUN [ "yarn", "build" ]
|
|
|
|
|
|
|
|
# Expose the two relevant ports
|
|
|
|
EXPOSE 3000 8080
|
|
|
|
|
|
|
|
# Serve the app
|
2020-05-24 22:03:51 +02:00
|
|
|
CMD [ "yarn", "serve:production" ]
|