|
|
@ -32,6 +32,14 @@ RUN cargo build --frozen --release |
|
|
|
# Get diesel-cli on there just in case |
|
|
|
# RUN cargo install diesel_cli --no-default-features --features postgres |
|
|
|
|
|
|
|
|
|
|
|
FROM ekidd/rust-musl-builder:1.38.0-openssl11 as docs |
|
|
|
WORKDIR /app |
|
|
|
COPY docs ./docs |
|
|
|
RUN sudo chown -R rust:rust . |
|
|
|
RUN mdbook build docs/ |
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:3.10 |
|
|
|
|
|
|
|
# Install libpq for postgres |
|
|
@ -40,6 +48,7 @@ RUN apk add libpq |
|
|
|
# Copy resources |
|
|
|
COPY server/config/defaults.hjson /config/defaults.hjson |
|
|
|
COPY --from=rust /app/server/target/x86_64-unknown-linux-musl/release/lemmy_server /app/lemmy |
|
|
|
COPY --from=docs /app/docs/book/ /app/dist/documentation/ |
|
|
|
COPY --from=node /app/ui/dist /app/dist |
|
|
|
|
|
|
|
RUN addgroup -g 1000 lemmy |
|
|
|