From 46c5244c1f42d10c1d1d7edeef1a53b737708450 Mon Sep 17 00:00:00 2001 From: mat ess Date: Wed, 1 Mar 2023 09:19:54 -0500 Subject: [PATCH] Deploy to fly.io --- .dockerignore | 12 ++++++++++++ Dockerfile | 8 ++++++++ fly.toml | 16 ++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 fly.toml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..61756e5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +/.direnv +/result +/target +/.pre-commit-config.yaml +.env + + +# Added by cargo +# +# already existing elements were commented out + +#/target diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..aa38d1d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM rust:1.67 as builder +WORKDIR /usr/src/buscemi +COPY . . +RUN cargo install --path . + +FROM debian:bullseye-slim +COPY --from=builder /usr/local/cargo/bin/buscemi /usr/local/bin/buscemi +CMD ["buscemi"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..9f3621e --- /dev/null +++ b/fly.toml @@ -0,0 +1,16 @@ +# fly.toml file generated for buscemi on 2023-02-28T21:37:01-05:00 + +app = "buscemi" +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[env] + +[experimental] + auto_rollback = true + +[[services]] + internal_port = 8080 + processes = ["app"] + protocol = "tcp"