Skip to content

Commit b1e7a74

Browse files
authored
Merge pull request #42 from donvito/feature/flyio-deployment
feat: add Docker and Fly.io configuration files
2 parents 1832a5a + 562b98d commit b1e7a74

File tree

3 files changed

+184
-0
lines changed

3 files changed

+184
-0
lines changed

.dockerignore

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# flyctl launch added from .gitignore
2+
**/dist
3+
**/sandbox
4+
5+
# Cloudflare Workers
6+
**/worker
7+
**/.wrangler
8+
9+
# Logs
10+
**/logs
11+
**/*.log
12+
**/npm-debug.log*
13+
**/yarn-debug.log*
14+
**/yarn-error.log*
15+
**/lerna-debug.log*
16+
**/.pnpm-debug.log*
17+
18+
# Diagnostic reports (https://nodejs.org/api/report.html)
19+
**/report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
20+
21+
# Runtime data
22+
**/pids
23+
**/*.pid
24+
**/*.seed
25+
**/*.pid.lock
26+
27+
# Directory for instrumented libs generated by jscoverage/JSCover
28+
**/lib-cov
29+
30+
# Coverage directory used by tools like istanbul
31+
**/coverage
32+
**/*.lcov
33+
34+
# nyc test coverage
35+
**/.nyc_output
36+
37+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
38+
**/.grunt
39+
40+
# Bower dependency directory (https://bower.io/)
41+
**/bower_components
42+
43+
# node-waf configuration
44+
**/.lock-wscript
45+
46+
# Compiled binary addons (https://nodejs.org/api/addons.html)
47+
**/build/Release
48+
49+
# Dependency directories
50+
**/node_modules
51+
**/jspm_packages
52+
53+
# Snowpack dependency directory (https://snowpack.dev/)
54+
**/web_modules
55+
56+
# TypeScript cache
57+
**/*.tsbuildinfo
58+
59+
# Optional npm cache directory
60+
**/.npm
61+
62+
# Optional eslint cache
63+
**/.eslintcache
64+
65+
# Optional stylelint cache
66+
**/.stylelintcache
67+
68+
# Microbundle cache
69+
**/.rpt2_cache
70+
**/.rts2_cache_cjs
71+
**/.rts2_cache_es
72+
**/.rts2_cache_umd
73+
74+
# Optional REPL history
75+
**/.node_repl_history
76+
77+
# Output of 'npm pack'
78+
**/*.tgz
79+
80+
# Yarn Integrity file
81+
**/.yarn-integrity
82+
83+
# dotenv environment variable files
84+
**/.env
85+
**/.env.development.local
86+
**/.env.test.local
87+
**/.env.production.local
88+
**/.env.local
89+
90+
# parcel-bundler cache (https://parceljs.org/)
91+
**/.cache
92+
**/.parcel-cache
93+
94+
# Next.js build output
95+
**/.next
96+
**/out
97+
98+
# Nuxt.js build / generate output
99+
**/.nuxt
100+
101+
# Gatsby files
102+
**/.cache
103+
# Comment in the public line in if your project uses Gatsby and not Next.js
104+
# https://nextjs.org/blog/next-9-1#public-directory-support
105+
# public
106+
107+
# vuepress build output
108+
**/.vuepress/dist
109+
110+
# vuepress v2.x temp and cache directory
111+
**/.temp
112+
**/.cache
113+
114+
# Serverless directories
115+
**/.serverless
116+
117+
# FuseBox cache
118+
**/.fusebox
119+
120+
# DynamoDB Local files
121+
**/.dynamodb
122+
123+
# TernJS port file
124+
**/.tern-port
125+
126+
# Stores VSCode versions used for testing VSCode extensions
127+
**/.vscode-test
128+
129+
# yarn v2
130+
**/.yarn/cache
131+
**/.yarn/unplugged
132+
**/.yarn/build-state.yml
133+
**/.yarn/install-state.gz
134+
**/.pnp.*
135+
136+
# IDE-specific settings
137+
**/.idea
138+
**/.vscode
139+
140+
# Misc
141+
**/.DS_Store
142+
143+
**/*env
144+
fly.toml

.github/workflows/fly-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+
name: Fly Deploy
4+
on:
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
deploy:
10+
name: Deploy app
11+
runs-on: ubuntu-latest
12+
concurrency: deploy-group # optional: ensure only one action runs at a time
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: superfly/flyctl-actions/setup-flyctl@master
16+
- run: flyctl deploy --remote-only
17+
env:
18+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

fly.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# fly.toml app configuration file generated for ai-backends on 2025-08-21T13:18:03+08:00
2+
#
3+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+
#
5+
6+
app = 'ai-backends'
7+
primary_region = 'sin'
8+
9+
[build]
10+
11+
[http_service]
12+
internal_port = 3000
13+
force_https = true
14+
auto_stop_machines = 'stop'
15+
auto_start_machines = true
16+
min_machines_running = 0
17+
processes = ['app']
18+
19+
[[vm]]
20+
memory = '1gb'
21+
cpu_kind = 'shared'
22+
cpus = 1

0 commit comments

Comments
 (0)