y-webrtc/Dockerfile

30 lines
593 B
Text
Raw Normal View History

2023-03-21 00:44:25 +00:00
FROM alpine:3.17 as builder
2023-03-16 14:27:49 +00:00
2023-03-21 00:44:25 +00:00
RUN apk add --no-cache nodejs-current npm
2023-03-16 14:27:49 +00:00
RUN mkdir /app
WORKDIR /app
# NPM will not install any package listed in "devDependencies" when NODE_ENV is set to "production",
# to install all modules: "npm install --production=false".
# Ref: https://docs.npmjs.com/cli/v9/commands/npm-install#description
ENV NODE_ENV production
COPY . .
RUN npm install
2023-03-21 00:44:25 +00:00
FROM alpine:3.17
RUN apk add --no-cache nodejs-current npm
2023-03-16 14:27:49 +00:00
LABEL fly_launch_runtime="nodejs"
COPY --from=builder /app /app
WORKDIR /app
ENV NODE_ENV production
ENV PORT 8080
CMD [ "npm", "run", "start" ]