From 02dab0d7bf4f9bc885a65adc42f500f9d88810b4 Mon Sep 17 00:00:00 2001 From: "Fly.io" Date: Mon, 23 Dec 2024 08:28:40 +0000 Subject: [PATCH] New files from Fly.io Launch --- Dockerfile | 14 ++++++++++++++ fly.toml | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Dockerfile create mode 100644 fly.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa878e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +ARG GO_VERSION=1 +FROM golang:${GO_VERSION}-bookworm as builder + +WORKDIR /usr/src/app +COPY go.mod go.sum ./ +RUN go mod download && go mod verify +COPY . . +RUN go build -v -o /run-app . + + +FROM debian:bookworm + +COPY --from=builder /run-app /usr/local/bin/ +CMD ["run-app"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..1bdcd0c --- /dev/null +++ b/fly.toml @@ -0,0 +1,28 @@ +# fly.toml app configuration file generated for incase on 2024-12-23T08:25:26Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'incase' +primary_region = 'ams' + +[build] + [build.args] + GO_VERSION = '1.22' + +[env] + PORT = '8080' + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + memory_mb = 1024