From bffdb7add764c2182d0015a2fe8da9ccefdfd55e Mon Sep 17 00:00:00 2001 From: lyj <2457395722@qq.com> Date: Tue, 31 Dec 2024 09:50:08 +0000 Subject: [PATCH] up --- .dockerignore | 4 ++ .github/workflows/fly-deploy.yml | 18 +++++++ .vscode/settings.json | 23 +++++++++ fly.toml | 83 ++++++++++++++------------------ 4 files changed, 80 insertions(+), 48 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/fly-deploy.yml create mode 100644 .vscode/settings.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c03670b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +# flyctl launch added from .gitignore +litestream.yml +**/config.yaml +fly.toml diff --git a/.github/workflows/fly-deploy.yml b/.github/workflows/fly-deploy.yml new file mode 100644 index 0000000..b0c246e --- /dev/null +++ b/.github/workflows/fly-deploy.yml @@ -0,0 +1,18 @@ +# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ + +name: Fly Deploy +on: + push: + branches: + - main +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + concurrency: deploy-group # optional: ensure only one action runs at a time + steps: + - uses: actions/checkout@v4 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..91a7184 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + "MicroPython.executeButton": [ + { + "text": "▶", + "tooltip": "运行", + "alignment": "left", + "command": "extension.executeFile", + "priority": 3.5 + } + ], + "MicroPython.syncButton": [ + { + "text": "$(sync)", + "tooltip": "同步", + "alignment": "left", + "command": "extension.execute", + "priority": 4 + } + ], + "python.autoComplete.extraPaths": [ + "/home/codespace/.vscode-remote/extensions/rt-thread.rt-thread-micropython-1.0.11/microExamples/code-completion" + ] +} \ No newline at end of file diff --git a/fly.toml b/fly.toml index d8ac998..f2e1461 100644 --- a/fly.toml +++ b/fly.toml @@ -1,64 +1,51 @@ -# fly.toml file generated for nz on 2022-02-07T02:08:50+08:00 +# fly.toml app configuration file generated for fakev-status on 2024-12-31T09:43:00Z +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# -app = "fakev-status" - -kill_signal = "SIGINT" -kill_timeout = 5 -processes = [] - -[env] +app = 'fakev-status' +primary_region = 'sin' +kill_signal = 'SIGINT' +kill_timeout = '5s' [experimental] - allowed_public_ports = [] auto_rollback = true -[mounts] - destination = "/dashboard/data" - source = "nz_data" -[http_service.http_options] - h2_backend = true +[build] + +[[mounts]] + source = 'nz_data' + destination = '/dashboard/data' + +[http_service] + internal_port = 8008 + + [http_service.http_options] + h2_backend = true [[services]] - http_checks = [] + protocol = 'tcp' internal_port = 80 - processes = ["app"] - protocol = "tcp" - script_checks = [] - - [services.concurrency] - hard_limit = 25 - soft_limit = 20 - type = "connections" + processes = ['app'] [[services.ports]] - handlers = ["http"] port = 80 + handlers = ['http'] force_https = true - + [[services.ports]] - handlers = ["tls", "http"] port = 443 + handlers = ['tls', 'http'] - [[services.tcp_checks]] - grace_period = "1s" - interval = "15s" - restart_limit = 0 - timeout = "2s" - -[[services]] - internal_port = 5555 - processes = ["app"] - protocol = "tcp" - - [[services.ports]] - handlers = [ "http"] - port = 5554 - [[services.ports]] - handlers = ["tls"] - port = 5555 - tls_options = { "alpn" = ["h2"] } - [[services.ports]] - port = 5556 - [services.ports.http_options] - h2_backend = true + [services.concurrency] + type = 'connections' + hard_limit = 25 + soft_limit = 20 + [[services.tcp_checks]] + interval = '15s' + timeout = '2s' + grace_period = '1s' + +[[vm]] + size = 'shared-cpu-1x'