Sign inSign up

tekki/mojolicious

By tekki

•Updated about 2 months ago

Web framework for the Perl programming language

Image
Web servers
4

10K+

tekki/mojolicious repository overview

⁠What is Mojolicious?

Mojolicious⁠ is a real-time web framework and web development toolkit written in Perl⁠.

The images are based on perl:5.44.0-trixie and provide Mojolicious installed together with Cpanel::JSON::XS⁠, CryptX⁠, DBI⁠, Future::AsyncAwait⁠, IO::Socket::Socks⁠, Net::SSLeay⁠, IO::Socket::SSL⁠, Net::DNS::Native⁠, Role::Tiny⁠, SQL::Abstract⁠.

mariadb and mysql both include DBD::MariaDB and DBD::mysql. The difference is in the C libraries they are built with.

⁠How to use this image

⁠Simple application

Go to your code folder, call Mojolicious to create the basic application structure with you as the owner.

$ docker container run --rm -u $UID -v "$(pwd):/usr/src/app" tekki/mojolicious mojo generate app MyApp

Start the application as daemon.

$ cd my_app
$ docker container run -d --rm -v "$(pwd):/usr/src/app" -p 3000:3000 tekki/mojolicious morbo script/my_app

To run the container in the foreground and read the output, omit the -d.

$ docker container run --rm -v "$(pwd):/usr/src/app" -p 3000:3000 tekki/mojolicious morbo script/my_app

Browse to localhost:3000⁠ and edit the code in the current folder. If you are on Linux or MacOS, the server will restart whenever you change a file. On Windows this works if you use Docker Desktop with WSL 2.

To switch from development to production an run the application as daemon in the full featured non-blocking web server start it with

$ docker container run -d --rm -v "$(pwd):/usr/src/app" -p 3000:3000 tekki/mojolicious script/my_app prefork

⁠Source

The source of this image on GitHub⁠.

Tag summary

Content type

Image

Digest

sha256:beea7bfbc…

Size

379.4 MB

Last updated

about 2 months ago

docker pull tekki/mojolicious