diff --git a/Dockerfile b/Dockerfile index 45f7fb4..a9dc920 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,8 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ # Runtime image FROM rust:latest +# Fly.io entrypoint +ADD fly-relay.sh . + # Copy the compiled binaries COPY --from=builder /usr/local/cargo/bin /usr/local/cargo/bin diff --git a/fly-relay.sh b/fly-relay.sh new file mode 100755 index 0000000..26de9b1 --- /dev/null +++ b/fly-relay.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +mkdir cert +# Nothing to see here... +echo "$MOQ_CRT" | base64 -d > dev/moq-demo.crt +echo "$MOQ_KEY" | base64 -d > dev/moq-demo.key + +RUST_LOG=info /usr/local/cargo/bin/moq-relay --cert dev/moq-demo.crt --key dev/moq-demo.key diff --git a/fly.toml b/fly.toml index cf62599..1d42dd6 100644 --- a/fly.toml +++ b/fly.toml @@ -6,7 +6,7 @@ kill_timeout = 5 PORT = "4443" [experimental] - cmd = "./entrypoint.sh" + cmd = "./fly-relay.sh" [[services]] internal_port = 4443