Fix sqlx in docker build
This commit is contained in:
parent
9eae874c02
commit
607937edda
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
target
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
db.sqlite3
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
FROM rust:1.83 as builder
|
||||
FROM rust:1.83 AS builder
|
||||
|
||||
WORKDIR /usr/src/backend
|
||||
|
||||
RUN apt update && apt install -y musl-tools
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
RUN cargo install sqlx-cli
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN sqlx database create --database-url sqlite://db.sqlite3
|
||||
RUN sqlx migrate run --source sync_server/src/database/migrations --database-url sqlite://db.sqlite3
|
||||
|
||||
RUN cargo build --package sync_server --release --target x86_64-unknown-linux-musl
|
||||
|
||||
FROM alpine:3.21.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue