diff --git a/.github/workflows/pro-deploy.yml b/.github/workflows/pro-deploy.yml new file mode 100644 index 000000000..6f37d4212 --- /dev/null +++ b/.github/workflows/pro-deploy.yml @@ -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 +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 --config fly-pro.toml + env: + FLY_API_TOKEN: ${{ secrets.FLYIO_PRO_TOKEN }} diff --git a/Dockerfile_backend b/Dockerfile_backend index 6e883720b..a0ca598ee 100644 --- a/Dockerfile_backend +++ b/Dockerfile_backend @@ -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 diff --git a/fly-pro.toml b/fly-pro.toml new file mode 100644 index 000000000..c24a3a6c6 --- /dev/null +++ b/fly-pro.toml @@ -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