0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/rust/Dockerfile.migrate-hooks
Michael Matloka 456466b59c
feat(max): Use new "Product description" project setting (#25937)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-04 16:34:24 +00:00

17 lines
466 B
Docker

FROM docker.io/library/rust:1.80.1-bullseye as builder
RUN apt update && apt install build-essential cmake -y
RUN cargo install sqlx-cli@0.7.3 --locked --no-default-features --features native-tls,postgres --root /app/target/release/
FROM debian:bullseye-20230320-slim AS runtime
WORKDIR /sqlx
COPY bin /sqlx/bin/
COPY migrations /sqlx/migrations/
COPY --from=builder /app/target/release/bin/sqlx /usr/local/bin
RUN chmod +x ./bin/migrate
CMD ["./bin/migrate"]