Compare commits
3 Commits
d7d7fa9718
...
b37273cfbe
| Author | SHA1 | Date | |
|---|---|---|---|
| b37273cfbe | |||
| f344d69419 | |||
| 901aba9c7f |
@ -24,7 +24,7 @@ COPY . .
|
||||
RUN cargo build --release -p monzo-ingestion
|
||||
|
||||
# Stage 2: Run
|
||||
FROM debian:bullseye-slim AS final
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get update && \
|
||||
@ -46,7 +46,7 @@ RUN adduser \
|
||||
USER appuser
|
||||
|
||||
# Copy the executable from the "build" stage.
|
||||
COPY --from=builder /build/target/release/monzo-ingestion /bin/
|
||||
COPY --from=builder /build/target/release/monzo-ingestion /bin/server
|
||||
|
||||
# Expose the port that the application listens on.
|
||||
EXPOSE 3000
|
||||
@ -55,4 +55,4 @@ HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
|
||||
CMD curl -f http://localhost:3000/health || exit 1
|
||||
|
||||
# What the container should run when it is started.
|
||||
CMD ["/bin/server"]
|
||||
CMD ["/bin/server", "serve", "--addr", "0.0.0.0:3000"]
|
||||
|
||||
@ -28,7 +28,7 @@ enum Commands {
|
||||
down: bool,
|
||||
},
|
||||
|
||||
Run {
|
||||
Serve {
|
||||
/// If we should perform migration on startup.
|
||||
#[clap(short, long, env, default_value_t = true)]
|
||||
migrate: bool,
|
||||
@ -82,7 +82,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
Commands::Run { migrate, addr } => {
|
||||
Commands::Serve { migrate, addr } => {
|
||||
if migrate {
|
||||
Migrator::up(&connection, None).await?;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user