Skip to content

Commit

Permalink
added fly.io config and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cufee committed Jun 6, 2024
1 parent ddd94f0 commit cdc0ae2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/canary_fly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Fly Deploy to Canary

on:
push:
branches:
- canary
workflow_dispatch: {}

jobs:
deploy:
name: Deploy app to canary
runs-on: ubuntu-latest
concurrency: deploy-group
steps:
- uses: actions/checkout@v4
- run: flyctl deploy --remote-only -c fly.canary.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_CANARY }}
41 changes: 41 additions & 0 deletions fly.canary.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
app = 'aftermath-canary'
primary_region = 'lhr'
kill_signal = 'SIGINT'
kill_timeout = '5s'


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

[env]
# Database configuration
DATABASE_URL = "file:/data/db/canary.db"
# Wargaming API
WG_PRIMARY_APP_RPS = "10"
WG_REQUEST_TIMEOUT_SEC = "5"
# External services
BLITZ_STARS_API_URL = "https://www.blitzstars.com/api"
WOT_BLITZ_PUBLIC_API_URL_FMT = "https://%s.wotblitz.com/en/api"
WOT_INSPECTOR_REPLAYS_URL = 'https://api.wotinspector.com/v2/blitz/replays/'
WOT_INSPECTOR_TANK_DB_URL = "https://armor.wotinspector.com/static/armorinspector/tank_db_blitz.js"
# Discord
DISCORD_PRIMARY_GUILD_ID = "1090331056449781793"
# Misc configuration
LOG_LEVEL = "info"
NETWORK = "tcp"
PORT = "8080"

[[mounts]]
source = 'aftermath_canary_data'
destination = '/data/db'
initial_size = '1GB'
auto_extend_size_threshold = 80
auto_extend_size_increment = '1GB'
auto_extend_size_limit = '100GB'

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

0 comments on commit cdc0ae2

Please sign in to comment.