Fixing prod dockerfile.
This commit is contained in:
parent
72ad278226
commit
0aef04f737
1 changed files with 1 additions and 14 deletions
15
docker/prod/Dockerfile
vendored
15
docker/prod/Dockerfile
vendored
|
@ -36,18 +36,6 @@ WORKDIR /app
|
||||||
COPY --chown=rust:rust docs ./docs
|
COPY --chown=rust:rust docs ./docs
|
||||||
RUN mdbook build docs/
|
RUN mdbook build docs/
|
||||||
|
|
||||||
FROM node:12-buster as node
|
|
||||||
|
|
||||||
WORKDIR /app/ui
|
|
||||||
|
|
||||||
# Cache deps
|
|
||||||
COPY ui/package.json ui/yarn.lock ./
|
|
||||||
RUN yarn install --pure-lockfile --network-timeout 600000
|
|
||||||
|
|
||||||
# Build
|
|
||||||
COPY ui /app/ui
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
FROM alpine:3.12 as lemmy
|
FROM alpine:3.12 as lemmy
|
||||||
|
|
||||||
# Install libpq for postgres
|
# Install libpq for postgres
|
||||||
|
@ -62,8 +50,7 @@ RUN adduser -D -s /bin/sh -u 1000 -G lemmy lemmy
|
||||||
# Copy resources
|
# Copy resources
|
||||||
COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson
|
COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson
|
||||||
COPY --chown=lemmy:lemmy --from=rust /app/server/lemmy_server /app/lemmy
|
COPY --chown=lemmy:lemmy --from=rust /app/server/lemmy_server /app/lemmy
|
||||||
COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/dist/documentation/
|
COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/documentation/
|
||||||
COPY --chown=lemmy:lemmy --from=node /app/ui/dist /app/dist
|
|
||||||
|
|
||||||
RUN chown lemmy:lemmy /app/lemmy
|
RUN chown lemmy:lemmy /app/lemmy
|
||||||
USER lemmy
|
USER lemmy
|
||||||
|
|
Loading…
Reference in a new issue