-
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
083620d
commit 40dfad9
Showing
4 changed files
with
103 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# flyctl launch added from .gitignore | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
**/*.exe | ||
**/*.exe~ | ||
**/*.dll | ||
**/*.so | ||
**/*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
**/*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
**/*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
**/go.work | ||
**/go.work.sum | ||
|
||
# env file | ||
**/.env | ||
|
||
**/tmp | ||
**/data | ||
**/node_modules | ||
|
||
# flyctl launch added from node_modules/.pnpm/[email protected]/node_modules/tailwindcss/stubs/.gitignore | ||
!node_modules/.pnpm/[email protected]/node_modules/tailwindcss/stubs/**/* | ||
fly.toml |
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,18 @@ | ||
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ | ||
|
||
name: Fly Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
concurrency: deploy-group # optional: ensure only one action runs at a time | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
- run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
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 @@ | ||
ARG GO_VERSION=1 | ||
|
||
# Build stage | ||
FROM golang:${GO_VERSION}-alpine as builder | ||
|
||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
COPY . . | ||
RUN CGO_ENABLED=1 go build -v -o ./main ./src | ||
|
||
|
||
# Production stage | ||
FROM alpine:latest | ||
|
||
RUN apk --no-cache add ca-certificates | ||
|
||
COPY --from=builder /app/main /main | ||
COPY --from=builder /app/templates /templates | ||
COPY --from=builder /app/static /static | ||
|
||
CMD ["./main"] |
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,29 @@ | ||
# fly.toml app configuration file generated for filtrert on 2024-09-14T16:59:40+02:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = 'filtrert' | ||
primary_region = 'arn' | ||
|
||
[build] | ||
[build.args] | ||
GO_VERSION = '1.23.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]] | ||
size = 'shared-cpu-1x' | ||
|
||
[mounts] | ||
source = 'data' | ||
destination = '/data' |