mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-15 03:46:26 +00:00
23 lines
457 B
Docker
23 lines
457 B
Docker
# 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", "."]
|