Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pro deployment initial #1883

Merged
merged 12 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pro-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Deploy pro-backend
on:
push:
branches:
- develop
- pro
Comment on lines +7 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Deploying on both 'develop' and 'pro' branches could lead to unintended deployments. Consider limiting to just 'pro' branch for production deployments.

jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider using a more specific concurrency group name like 'pro-deploy-group' to avoid conflicts with other workflows

steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly-pro.toml
env:
FLY_API_TOKEN: ${{ secrets.FLYIO_PRO_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile_backend
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN go build -ldflags="-X 'main.Version=${COMMIT_SHA}'" -o backend_exe ./backend

# Multi-stage build will just copy the binary to an alpine image.
FROM ubuntu:24.04 as runner
ENV ATLAS_VERSION v0.28.0
ENV ATLAS_VERSION v0.31.0
ARG COMMIT_SHA
WORKDIR /app

Expand Down
38 changes: 38 additions & 0 deletions fly-pro.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# fly.toml app configuration file generated for digger-pro on 2025-02-18T09:50:24+03:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'digger-pro'
primary_region = 'lhr'

[env]
DIGGER_CLOUD_HOSTNAME = 'https://ui-backend.digger.dev'
JWT_AUTH = 'true'

[build]
dockerfile = 'Dockerfile_backend'

[[services]]
protocol = 'tcp'
internal_port = 3000
processes = ['app']

[[services.ports]]
port = 80
handlers = ['http']
force_https = true

[[services.ports]]
port = 443
handlers = ['tls', 'http']

[services.concurrency]
type = 'connections'
hard_limit = 25
soft_limit = 20

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
Loading