fix
This commit is contained in:
parent
e4d62909c3
commit
b74e58ff28
20
github/frontpage/packages-rs/drainpipe/Dockerfile
Normal file
20
github/frontpage/packages-rs/drainpipe/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM rust:1.78-alpine AS builder
|
||||||
|
|
||||||
|
RUN apk add libressl-dev musl-dev sqlite-dev
|
||||||
|
|
||||||
|
WORKDIR /usr/src/unravel
|
||||||
|
COPY . .
|
||||||
|
# TODO: Use cargo-chef to cache dependencies compilation independently of the binary
|
||||||
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
--mount=type=cache,target=/root/target \
|
||||||
|
cargo build --release --package drainpipe && \
|
||||||
|
# Move the release binary to a folder to be copied to the final image. It can't be copied directly from the target folder because it's in a cache mount
|
||||||
|
# See https://gist.github.com/noelbundick/6922d26667616e2ba5c3aff59f0824cd?permalink_comment_id=4379948#gistcomment-4379948
|
||||||
|
mv ./target/release /root
|
||||||
|
|
||||||
|
FROM alpine:3.14
|
||||||
|
COPY --from=builder /root/release/drainpipe /
|
||||||
|
|
||||||
|
ENV DATABASE_URL="/drainpipedata/drainpipe.db"
|
||||||
|
|
||||||
|
ENTRYPOINT ["/drainpipe"]
|
@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
drainpipe:
|
||||||
|
build:
|
||||||
|
dockerfile: ./packages-rs/drainpipe/Dockerfile
|
||||||
|
context: ../../
|
||||||
|
env_file:
|
||||||
|
- ./.env.local
|
||||||
|
volumes:
|
||||||
|
- ./drainpipedata:/drainpipedata
|
Loading…
x
Reference in New Issue
Block a user