-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
ae2fe39
commit 32324bb
Showing
8 changed files
with
32 additions
and
18 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,3 +1,5 @@ | ||
.env.example | ||
.env.dev | ||
fly.toml | ||
Dockerfile | ||
Dockerfile.dev |
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,23 +1,25 @@ | ||
FROM golang:1.20-alpine AS development | ||
FROM golang:1.22-alpine AS development | ||
|
||
RUN mkdir /app | ||
|
||
ADD go.mod go.sum /app/ | ||
|
||
WORKDIR /app | ||
|
||
RUN go mod tidy | ||
RUN go install golang.org/x/tools/gopls@latest | ||
|
||
RUN go mod download | ||
|
||
COPY . /app | ||
|
||
RUN GOOS=linux go build -ldflags="-s -w" -o main main.go | ||
|
||
FROM alpine AS production | ||
|
||
LABEL "maintainer"="thuongtruong1009" | ||
LABEL "maintainer"="thuongtruong109" | ||
LABEL "org.opencontainers.image.authors"="Tran Nguyen Thuong Truong <[email protected]>" | ||
LABEL "org.opencontainers.image.version"="1.0" | ||
LABEL "org.opencontainers.image.description"="Official image of short1url api" | ||
LABEL "org.opencontainers.image.description"="Official image of onelink api" | ||
LABEL "org.opencontainers.image.licenses"="MIT" | ||
LABEL "org.opencontainers.image.source"="https://github.com/thuongtruong109/onelink/api" | ||
LABEL "org.opencontainers.image.documentation"="https://github.com/thuongtruong109/onelink/blob/main/README.md" | ||
|
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
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,15 +1,20 @@ | ||
# fly.toml app configuration file generated for short1url-api on 2023-10-21T22:51:32+07:00 | ||
# fly.toml app configuration file generated for onelink on 2024-08-10T20:06:17+07:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "short1url-api" | ||
primary_region = "sin" | ||
app = 'onelink' | ||
primary_region = 'sin' | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 8080 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_stop_machines = 'stop' | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
processes = ['app'] | ||
|
||
[[vm]] | ||
size = 'shared-cpu-1x' |
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
File renamed without changes.
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
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