Fly #1

Merged
tudor merged 3 commits from fly into master 2024-02-01 22:09:20 +02:00
5 changed files with 48 additions and 5 deletions

View File

@ -1 +1,4 @@
_site
flake.nix
flake.lock
.gitea

16
.gitea/workflows/fly.yml Normal file
View File

@ -0,0 +1,16 @@
name: Fly Deploy
on:
push:
branches: [master]
jobs:
deploy:
name: Deploy website
runs-on: nix
concurrency: deploy-group
steps:
- uses: actions/checkout@v3
- name: Deploy!
run: nix run .#flyctl -- deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

View File

@ -2,13 +2,13 @@
auto_https off
}
http://localhost:8080, http://tudorrro.fly.dev {
http://localhost:8080, http://tudorr.ro {
root * /usr/share/caddy
file_server
log
respond /health OK
}
#
# http://tudorrro.fly.dev {
# redir https://tudorr.ro/
# }
http://tudorrro.fly.dev, http://www.tudorr.ro {
redir https://tudorr.ro/
}

View File

@ -33,6 +33,7 @@
};
packages.default = (pkgs.extend self.overlays.default).runLume;
packages.flyctl = pkgs.flyctl;
};
};
}

23
fly.toml Normal file
View File

@ -0,0 +1,23 @@
app = 'tudorrro'
primary_region = 'ams'
[build]
[http_service]
internal_port = 80
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[vm]]
cpu_kind = 'shared'
cpus = 1
memory_mb = 256
[checks]
[checks.health]
type = "http"
port = 80
path = "/health"