Skip to content

Commit e84e353

Browse files
haasonsaasclaude
andcommitted
Copy migrations directory in Dockerfile for sqlx::migrate!() macro
The sqlx::migrate!() macro embeds migrations at compile time and requires the migrations directory to exist during cargo build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0352d56 commit e84e353

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ WORKDIR /app
1616

1717
# Cache dependencies
1818
COPY Cargo.toml Cargo.lock ./
19+
COPY migrations ./migrations
1920
RUN mkdir src && echo 'fn main() {}' > src/main.rs && \
2021
mkdir -p web/dist && \
2122
cargo build --release && \

0 commit comments

Comments
 (0)