diff --git a/.github/workflows/fly-dev-deploy.yml b/.github/workflows/fly-dev-deploy.yml new file mode 100644 index 00000000..751b9b0a --- /dev/null +++ b/.github/workflows/fly-dev-deploy.yml @@ -0,0 +1,16 @@ +name: Fly Dev Deploy +on: + push: + branches: + - development +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + concurrency: deploy-group + steps: + - uses: actions/checkout@v4 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only -c fly.development.toml + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/.github/workflows/fly-prod-deploy.yml b/.github/workflows/fly-prod-deploy.yml new file mode 100644 index 00000000..4258ab35 --- /dev/null +++ b/.github/workflows/fly-prod-deploy.yml @@ -0,0 +1,16 @@ +name: Fly Prod Deploy +on: + push: + branches: + - main +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + concurrency: deploy-group + steps: + - uses: actions/checkout@v4 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only -c fly.production.toml + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/fly.development.toml b/fly.development.toml new file mode 100644 index 00000000..e1e8f972 --- /dev/null +++ b/fly.development.toml @@ -0,0 +1,33 @@ +app = 'semble-development' +primary_region = 'yyz' + +[build] + +[processes] + web = "npm start" + feed-worker = "npm run worker:feeds" + +[http_service] + internal_port = 3000 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['web'] + +[[vm]] + memory = '512mb' + cpu_kind = 'shared' + cpus = 1 + +[[vm]] + processes = ['feed-worker'] + memory = '256mb' + cpu_kind = 'shared' + cpus = 1 + +[env] +NODE_ENV="dev" +BASE_URL="https://api.dev.semble.so" +HOST="0.0.0.0" +APP_URL="https://dev.semble.so" diff --git a/fly.production.toml b/fly.production.toml new file mode 100644 index 00000000..65eaa133 --- /dev/null +++ b/fly.production.toml @@ -0,0 +1,33 @@ +app = 'semble-production' +primary_region = 'yyz' + +[build] + +[processes] + web = "npm start" + feed-worker = "npm run worker:feeds" + +[http_service] + internal_port = 3000 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 1 + processes = ['web'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + +[[vm]] + processes = ['feed-worker'] + memory = '512mb' + cpu_kind = 'shared' + cpus = 1 + +[env] +NODE_ENV="prod" +BASE_URL="https://api.semble.so" +HOST="0.0.0.0" +APP_URL="https://semble.so"