-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01f0e23
commit 88af21a
Showing
4 changed files
with
32 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
FROM golang:1.19 AS build | ||
WORKDIR /go/src/pinned | ||
COPY . . | ||
FROM golang:1.18-alpine | ||
WORKDIR /usr/src/app | ||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
RUN go mod download | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o app . | ||
|
||
|
||
FROM alpine:latest as release | ||
WORKDIR /app | ||
COPY --from=build /go/src/pinned/app . | ||
RUN apk -U upgrade \ | ||
&& apk add --no-cache dumb-init ca-certificates \ | ||
&& chmod +x /app/app | ||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
COPY . . | ||
RUN go build -o ./bin/pinned . | ||
EXPOSE 8080 | ||
CMD [ "./bin/pinned" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# fly.toml app configuration file generated for pinned on 2024-01-16T12:03:37+03:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "pinned" | ||
primary_region = "waw" | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 8080 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[vm]] | ||
cpu_kind = "shared" | ||
cpus = 1 | ||
memory_mb = 1024 |