This repository has been archived on 2020-04-21. You can view files and clone it, but cannot push or open issues or pull requests.
lemmy/ui/Dockerfile.prod

22 lines
457 B
Text

# Setup env
FROM node:10-alpine AS build
RUN mkdir -p /opt/lemmy/ui--prod
WORKDIR /opt/lemmy/ui--prod
# Install deps
COPY package.json .
COPY yarn.lock .
RUN npm install
# Add app
COPY . .
# Build app
RUN npm run build
# Setup env
FROM node:10-alpine
RUN mkdir -p /opt/lemmy/ui--prod
WORKDIR /opt/lemmy/ui--prod
RUN npm install serve
# Add app
COPY --from=build /opt/lemmy/ui--prod/dist .
# Run app
CMD ["/opt/lemmy/ui--prod/node_modules/.bin/serve", "."]