crablog/Dockerfile
Manuel 015d36ef91
Add change to compile with all threads again
Accidentally removed this on the last commits
Adds change from commit ec86734ea1 again
2021-02-13 14:04:43 +01:00

21 lines
420 B
Docker

FROM rust:alpine as build
ENV RUSTFLAGS='-C target-feature=-crt-static'
WORKDIR /app
COPY ./site .
RUN apk add --no-cache musl-dev sqlite-dev
RUN cargo install --path . -j $(nproc)
FROM alpine:latest
COPY --from=build /usr/local/cargo/bin/crablog /app/crablog
WORKDIR /app
RUN apk add --no-cache libgcc sqlite-libs
ENV ROOT_PATH=/app/content
ENV DATABASE_URL=${ROOT_PATH}/db.sqlite3
EXPOSE 8000
CMD ["./crablog"]