From 55c0896ded6ad7a35445c07fdc18a9c73d985947 Mon Sep 17 00:00:00 2001 From: "Fly.io" Date: Fri, 9 May 2025 14:21:38 +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..3eca6b5 --- /dev/null +++ b/fly.toml @@ -0,0 +1,28 @@ +# fly.toml app configuration file generated for grandrisingapi on 2025-05-09T14:19:03Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'grandrisingapi' +primary_region = 'bos' + +[build] + [build.args] + GO_VERSION = '1.24.0' + +[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