docs icon indicating copy to clipboard operation
docs copied to clipboard

Issue with the "OpenResty: NGINX + Lua" doc

Open isaacR23 opened this issue 9 months ago • 0 comments

Tutorial obsolete?

Title: OpenResty: NGINX + Lua Location: https://fly.io/docs/app-guides/openresty-nginx-plus-lua/ Source: https://github.com/superfly/docs/blob/main/app-guides/openresty-nginx-plus-lua.html.erb

I’ve been following the tutorial step by step: OpenResty, Nginx, and Lua on Fly.io

However, I noticed that the guide seems outdated. Some commands, like flyctl init --port 80, have been deprecated.

For instance after deploying the app and visiting flyctl open /api i got an ERR_CONNECTION_CLOSED. The server reads no errors:

2025-02-07T20:23:08Z app[683dd90a7279d8] xxx [info]2025-02-07T20:23:08.448069685 [01JKH18T307PRHYPM0G9R1Y4P5:main] Running Firecracker v1.7.0
2025-02-07T20:23:09Z app[683dd90a7279d8] xxx [info] INFO Starting init (commit: 5f9590744)...
2025-02-07T20:23:09Z app[683dd90a7279d8] xxx [info] INFO Preparing to run: `/usr/bin/openresty -g daemon off;` as root
2025-02-07T20:23:09Z app[683dd90a7279d8] xxx [info] INFO [fly api proxy] listening at /.fly/api
2025-02-07T20:23:09Z runner[683dd90a7279d8] xxx [info]Machine created and started in 13.595s
2025-02-07T20:23:09Z app[683dd90a7279d8] xxx [info]2025/02/07 20:23:09 INFO SSH listening listen_address=[fdaa:9:4fd:a7b:d6:b5de:cc99:2]:22 dns_server=[fdaa::3]:53

Is there a new - more updated way to do follow the tutorial? If not, are there any updated resources or recommended alternatives?

Here is the .toml file I used to deploy:

app = 'nginxserver3'
primary_region = 'xxx'

[build]

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[services]]
  protocol = 'tcp'
  internal_port = 8080

  [[services.ports]]
    port = 80
    handlers = ['http']

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1

isaacR23 avatar Feb 07 '25 21:02 isaacR23