-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
janus_db_migrator
container (#2177)
Janus now builds and ships a container image that bundles `sqlx` and the current Janus version's SQL migration scripts. This makes it easier for deployments to apply SQL migrations, as they no longer need to build a `sqlx` image themselves and (more importantly) figure out how to provide the appropriate set of migration scripts to whatever is applying the migrations. While updating the READMEs, I also fixed a few Markdown hyperlinks to make some long lines less long.
- Loading branch information
1 parent
3c1f526
commit 9c5884f
Showing
6 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM rust:1.73.0-alpine as builder | ||
ARG SQLX_VERSION | ||
RUN apk add libc-dev | ||
RUN cargo install sqlx-cli \ | ||
--version ${SQLX_VERSION} \ | ||
--no-default-features --features rustls,postgres | ||
|
||
FROM alpine:3.18.4 | ||
ARG SQLX_VERSION=unknown | ||
ARG GIT_REVISION=unknown | ||
LABEL revision ${GIT_REVISION} | ||
LABEL sqlx_version ${SQLX_VERSION} | ||
COPY --from=builder /usr/local/cargo/bin/sqlx /sqlx | ||
COPY db /migrations | ||
ENTRYPOINT ["/sqlx"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters