From a3c5b1bf8701c17f8a3c3fc76e6ecf257a31afd1 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Wed, 11 Sep 2024 14:42:00 +0100 Subject: [PATCH] chore: releasing beta build of autumn --- crates/services/autumn/Dockerfile | 13 ++++++++++++- crates/services/autumn/src/main.rs | 1 - scripts/publish-debug-image.sh | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crates/services/autumn/Dockerfile b/crates/services/autumn/Dockerfile index 70390857f..75eba7335 100644 --- a/crates/services/autumn/Dockerfile +++ b/crates/services/autumn/Dockerfile @@ -1 +1,12 @@ -# TODO: https://github.com/wader/static-ffmpeg \ No newline at end of file +# Build Stage +FROM ghcr.io/revoltchat/base:latest AS builder + +# Bundle Stage +FROM gcr.io/distroless/cc-debian12:nonroot +COPY --from=builder /home/rust/src/target/release/revolt-autumn ./ +COPY --from=mwader/static-ffmpeg:7.0.2 /ffmpeg /usr/local/bin/ +COPY --from=mwader/static-ffmpeg:7.0.2 /ffprobe /usr/local/bin/ + +EXPOSE 14704 +USER nonroot +CMD ["./revolt-autumn"] diff --git a/crates/services/autumn/src/main.rs b/crates/services/autumn/src/main.rs index e8ed464aa..ff29b2e3d 100644 --- a/crates/services/autumn/src/main.rs +++ b/crates/services/autumn/src/main.rs @@ -77,7 +77,6 @@ async fn main() -> Result<(), std::io::Error> { .with_state(db); // Configure TCP listener and bind - tracing::info!("hi vscode, please port forward http://127.0.0.1:14704, thank you!"); let address = SocketAddr::from((Ipv4Addr::UNSPECIFIED, 14704)); let listener = TcpListener::bind(&address).await?; axum::serve(listener, app.into_make_service()).await diff --git a/scripts/publish-debug-image.sh b/scripts/publish-debug-image.sh index 1da8a31e5..a724a2e02 100755 --- a/scripts/publish-debug-image.sh +++ b/scripts/publish-debug-image.sh @@ -23,6 +23,7 @@ echo "Building images, will tag for ghcr.io with $TAG!" docker build -t ghcr.io/revoltchat/base:latest -f Dockerfile.useCurrentArch . docker build -t ghcr.io/revoltchat/server:$TAG - < crates/delta/Dockerfile docker build -t ghcr.io/revoltchat/bonfire:$TAG - < crates/bonfire/Dockerfile +docker build -t ghcr.io/revoltchat/autumn:$TAG - < crates/services/autumn/Dockerfile if [ "$DEBUG" = "true" ]; then git restore Cargo.toml @@ -30,3 +31,4 @@ fi docker push ghcr.io/revoltchat/server:$TAG docker push ghcr.io/revoltchat/bonfire:$TAG +docker push ghcr.io/revoltchat/autumn:$TAG