-
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
14439d5
commit 9e9997e
Showing
5 changed files
with
81 additions
and
7 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,26 @@ | ||
# flyctl launch added from .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 | ||
|
||
# go workspace file | ||
**/go.work | ||
**/.tmp | ||
**/.testdata | ||
|
||
# project build | ||
**/main | ||
**/*templ.go | ||
**/static/output.css | ||
|
||
# mac stuff | ||
**/.DS_Store |
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 | ||
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
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,17 @@ | ||
FROM golang:alpine AS builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN wget -O tailwind https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.1/tailwindcss-linux-x64 && \ | ||
chmod +x tailwind && ./tailwind -i ./static/css/input.css -o ./static/css/output.css --minify | ||
|
||
RUN go install github.com/a-h/templ/cmd/templ@latest && templ generate | ||
|
||
RUN go build -o main ./cmd/main.go | ||
|
||
FROM scratch | ||
WORKDIR /app | ||
|
||
COPY --from=builder app/static/ ./static/ | ||
COPY --from=builder app/main app/.env . | ||
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,20 @@ | ||
app = 'imperium-tattoo' | ||
primary_region = 'gru' | ||
|
||
[build] | ||
[build.args] | ||
GO_VERSION = '1.22.5' | ||
|
||
[env] | ||
PORT = '3000' | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = 'stop' | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ['app'] | ||
|
||
[[vm]] | ||
size = 'shared-cpu-1x' |