Catalys...it::PSGI(3)

✨ NAME ✨

okay so this page lives in User Contributed Perl Documentation, and it's the manual for Catalyst::Manual::Deployment::NGINXUnit::PSGI β€” literally β€œDeploying Catalyst with NGINX Unit.” That's the whole assignment, bestie: get your Catalyst app living its best life under NGINX Unit. πŸ’…

🌸 NGINX Unit 🌸

Catalyst runs under NGINX Unit (https://unit.nginx.org) using PSGI. no cap, that's the setup. πŸ¦‹

πŸŽ€ Configuration πŸŽ€

To configure a Catalyst app in NGINX Unit, upload a JSON configuration snippet via Unit's config API. That API is available at an IP socket or a Unix domain socket (depending on Unit's startup settings):

# curl -X PUT --data-binary @config.json --unix-socket \
   /path/to/control.unit.sock http://localhost/config

A minimal configuration (https://unit.nginx.org/configuration/#perl) includes a listener and an application entity:

{
    "listeners": {
        "127.0.0.1:8080": {
            "pass": "applications/catalyst_app"
        }
    },

    "applications": {
        "catalyst_app": {
            "type": "perl",
            "script": "/path/to/apps/myapp/myapp.psgi",
            "user": "catalyst_user",
            "group": "catalyst_group"
        }
    }
}

Your "script" should point to your app's .psgi file; "user" and "group" should have appropriate access rights. πŸ‘‘

After a successful reconfiguration, you can manage your Catalyst app via the same config API. slay. ✨

🫢 Note: make sure the app's .psgi file includes the lib/ directory:
use lib 'lib';
use myapp;

πŸ’– MORE INFO πŸ’–

For more information on NGINX Unit, visit: http://unit.nginx.org β€” go get the lore, iykyk. 🌈

πŸ‘‘ AUTHORS πŸ‘‘

Catalyst Contributors, see Catalyst.pm. πŸ’œ

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. periodt. πŸŽ€


πŸŽ€ that's the whole page, bestie β€” cute little source/version + date footer vibes: perl v5.42.0, 2024-03-23, Catalys...it::PSGI(3). 🫢

πŸ“¦ where this page comes from