diff --git a/Dockerfile b/Dockerfile index b385a9d..e757f90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,11 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o /go/bin/app -FROM scratch +FROM gcr.io/distroless/static-debian11 + +COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /go/bin/app /app +# Set the entrypoint ENTRYPOINT ["/app"] diff --git a/fly.toml b/fly.toml index 570a7b4..b6aae58 100644 --- a/fly.toml +++ b/fly.toml @@ -8,12 +8,10 @@ primary_region = 'ord' [build] -[http_service] +[[services]] internal_port = 3000 -auto_stop_machines = 'suspend' -auto_start_machines = true +protocol = "tcp" min_machines_running = 1 -processes = ['app'] [[vm]] size = 'shared-cpu-1x'