docker-almalinux9-systemd-perl-starman-psgi - Dockerfile for Starman PSGI server running on Alma Linux 9 under Systemd
This Docker image is built from almalinux/9-init.
The docker image uses the Systemd configuration from https://serverfault.com/questions/1053187/systemd-fails-to-run-in-a-docker-container-when-using-cgroupv2-cgroupns-priva
Starman is a high-performance preforking PSGI/Plack web server. We install it with yum from RPMs at DavisNetworks
The Starman Systemd Unit File is installed by the Dockerfile as /usr/lib/systemd/system/starman.service and then enabled with systemctl. Starman is configured to run 3 workers and to listen on port 80 (this port must match the Dockerfile exposed port).
The PSGI App app.psgi is saved inside the Docker image as /app/app.psgi. This path is hard coded in the service file.
Dependencies to run the PSGI app inside the container must be installed in the Dockerfile. We install the dependencies for our example PSGI program one from the Alma Linux repositories and from the DavisNetworks.com repository.
- DateTime
- Plack::Middleware::Expires
- Plack::Middleware::Session::Cookie
- Plack::Middleware::Favicon_Simple
- Plack::Middleware::Method_Allow
$ make build
$ make run