mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
17 lines
453 B
Docker
17 lines
453 B
Docker
|
FROM docker.io/library/rust:1.74.0-buster as builder
|
||
|
|
||
|
RUN apt update && apt install build-essential cmake -y
|
||
|
RUN cargo install sqlx-cli@0.7.3 --no-default-features --features native-tls,postgres --root /app/target/release/
|
||
|
|
||
|
FROM debian:bullseye-20230320-slim AS runtime
|
||
|
WORKDIR /sqlx
|
||
|
|
||
|
ADD bin /sqlx/bin/
|
||
|
ADD migrations /sqlx/migrations/
|
||
|
|
||
|
COPY --from=builder /app/target/release/bin/sqlx /usr/local/bin
|
||
|
|
||
|
RUN chmod +x ./bin/migrate
|
||
|
|
||
|
CMD ["./bin/migrate"]
|