diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5479b088..e5fcbb00 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -260,14 +260,14 @@ jobs: env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - deploy-rama-echo: - runs-on: ubuntu-latest - needs: deploy-rama-fp-docker - steps: - - uses: actions/checkout@v4 - - uses: superfly/flyctl-actions/setup-flyctl@master - - run: | - cd rama-fp/infra/deployments/echo - flyctl deploy --remote-only - env: - FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + deploy-rama-echo: + runs-on: ubuntu-latest + needs: deploy-rama-fp-docker + steps: + - uses: actions/checkout@v4 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: | + cd rama-fp/infra/deployments/echo + flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 88d1b318..67362643 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1293,9 +1293,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ "bitflags 2.5.0", "errno", diff --git a/rama-fp/infra/deployments/echo/fly.toml b/rama-fp/infra/deployments/echo/fly.toml index 2220b6f0..42d68266 100644 --- a/rama-fp/infra/deployments/echo/fly.toml +++ b/rama-fp/infra/deployments/echo/fly.toml @@ -1,35 +1,47 @@ +# fly.toml app configuration file generated for rama-echo on 2024-03-19T23:16:07+01:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + app = 'rama-echo' primary_region = 'lhr' -[build] -image = "glendc/rama-fp:latest" - [experimental] -cmd = ["./rama-fp", "-i", "0.0.0.0", "-p", "8080", "--http-version", "auto", "echo"] +cmd = [ + './rama-fp', + '-i', + '0.0.0.0', + '-p', + '8080', + '--http-version', + 'auto', + 'echo', +] + +[build] +image = 'glendc/rama-fp:latest' [[services]] +protocol = 'tcp' internal_port = 8080 -protocol = "tcp" -force_https = false auto_stop_machines = true auto_start_machines = true min_machines_running = 1 processes = ['app'] [[services.ports]] -port = "80" +port = 80 [[services]] +protocol = 'tcp' internal_port = 8443 -protocol = "tcp" -force_https = false auto_stop_machines = true auto_start_machines = true min_machines_running = 1 processes = ['app'] [[services.ports]] -port = "443" +port = 443 [[vm]] memory = '256mb' diff --git a/rama-fp/src/service/endpoints.rs b/rama-fp/src/service/endpoints.rs index 4e92e888..25d97aa9 100644 --- a/rama-fp/src/service/endpoints.rs +++ b/rama-fp/src/service/endpoints.rs @@ -350,7 +350,10 @@ pub async fn get_assets_script() -> Response { pub async fn echo(ctx: Context, req: Request) -> Json { let http_info: super::data::HttpInfo = get_http_info(&req); - let query_params = req.uri().query().and_then(|q| serde_urlencoded::from_str::>(q).ok()); + let query_params = req + .uri() + .query() + .and_then(|q| serde_urlencoded::from_str::>(q).ok()); let (parts, body) = req.into_parts(); diff --git a/rama-fp/src/service/mod.rs b/rama-fp/src/service/mod.rs index fa790546..ba11b819 100644 --- a/rama-fp/src/service/mod.rs +++ b/rama-fp/src/service/mod.rs @@ -347,7 +347,7 @@ pub async fn echo(cfg: Config) -> anyhow::Result<()> { endpoints::get_acme_challenge, ) // Echo - .not_found(endpoints::echo) + .not_found(endpoints::echo), ); let tcp_service_builder = ServiceBuilder::new()