Skip to content

Commit

Permalink
Add fly.io deploy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar committed Mar 9, 2024
1 parent 498f3c0 commit 2ee0fc3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ go.work
*.sqlite3-journal

gochat

# Local Netlify folder
.netlify
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG GO_VERSION=1
FROM golang:${GO_VERSION}-bookworm as builder

WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /run-app .


FROM debian:bookworm

COPY --from=builder /run-app /usr/local/bin/
CMD ["run-app"]
25 changes: 25 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# fly.toml app configuration file generated for olzhaschat on 2024-03-09T12:58:45+05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'olzhaschat'
primary_region = 'waw'

[build]
[build.args]
GO_VERSION = '1.22'

[env]
PORT = '8080'

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
size = 'shared-cpu-1x'

0 comments on commit 2ee0fc3

Please sign in to comment.