Skip to content

Commit cf44847

Browse files
committedNov 8, 2024·
add fly.io
1 parent e4d511a commit cf44847

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed
 

‎.github/workflows/fly-deploy.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
deploy:
9+
name: Deploy app
10+
runs-on: ubuntu-latest
11+
concurrency: deploy-group
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: superfly/flyctl-actions/setup-flyctl@master
15+
- run: flyctl deploy --remote-only
16+
env:
17+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

‎flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
phpactor
1515

1616
docker-compose
17+
flyctl
1718
];
1819
};
1920
}

‎fly.toml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
app = "yata"
2+
primary_region = "ams"
3+
4+
[http_service]
5+
auto_start_machines = true
6+
auto_stop_machines = true
7+
force_https = true
8+
internal_port = 10_000
9+
min_machines_running = 0
10+
processes = [ "app" ]
11+
12+
[[vm]]
13+
cpu_kind = "shared"
14+
cpus = 1
15+
memory = "1gb"
16+
memory_mb = 512

‎src/view/home.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body>
1919
<div class="flex items-center justify-center h-screen">
20-
<p>Hello, <?php echo $agent?>!</p>
20+
<p>Hello! Your user agent is "<?php echo $agent?>"!</p>
2121
</div>
2222
</body>
2323
</html>

0 commit comments

Comments
 (0)
Please sign in to comment.