Openresty tutorial obsolete?

Hi,

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?

This is the .toml I used to launch the app:


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

that repo is 5 years old and was retired in 2022, Fly was almost a completely different company back then and most of its stack has changed since.

It’s probably easier for you to start from scratch with a simple Dockerfile with a basic, recent openresty GitHub - openresty/docker-openresty: Docker tooling for OpenResty

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.