Running Mod_Perl with Mojolicious in Docker
1–10 of 10 posts
Re: Running Mod_Perl with Mojolicious in Docker
#2Re: Running Mod_Perl with Mojolicious in Docker
#3 FROM motemen/mod_perl:5.36.0-2.4.58-2.0.13
# Run apt first, so layers can be reused if the image is built often, do not include package lists
RUN apt-get update -y && apt-get install -y wget make build-essential \
&& rm -rf /var/lib/apt/lists/*
# Installing modules/packages might also be done in the beginning (as long as they don't need other files in place)
# If you ever need something like package.json/pom.xml/Gemfile/requirements.txt etc., COPY those first)
RUN cpan -iT Plack Mojolicious
# Bigger dependencies that change less frequently can go first, for caching
COPY lib /usr/local/apache2/lib
# The rest of the configuration and app files
COPY app.psgi /app.psgi
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
COPY mojolicious.conf /usr/local/apache2/conf/mojolicious.conf
EXPOSE 80
CMD ["httpd-foreground"]
From: https://docs.docker.com/build/cache/(probably not super important unless you're doing a lot of stuff, but sometimes useful)
Re: Running Mod_Perl with Mojolicious in Docker
#4I would definitely label this Docker image something like Party_like_its_1999
Re: Running Mod_Perl with Mojolicious in Docker
#5Some thoughts on the ordering of instructions in the Dockerfile: FROM motemen/mod_perl:5.36.0-2.4.58-2.0.13 # Run apt first, so layers can be reused if the image is built often, do not include package lists RUN apt-get update -y && apt-get install -y wget make build-essential \ && rm -rf /var/lib/apt/lists/* # Installing modules/packages might also be done in the beginning (as long as they don't need other files in p…
Re: Running Mod_Perl with Mojolicious in Docker
#6I would definitely label this Docker image something like Party_like_its_1999
Re: Running Mod_Perl with Mojolicious in Docker
#7Re: Running Mod_Perl with Mojolicious in Docker
#8Earlier quoted context omitted.
Actually this setup uses Plack, a framework whose first version was released in 2009.
What are the reasons to use mod_perl in 2023? Plack FastCGI behind nginx looks like a better option.
A lot of our CI/CD is designed around mod_perl, and in-place updates. We run NewRelic configured to monitor Apache, which stops us from having to roll our own NewRelic connection through a CPAN module that we'd have to audit. In general for our needs, I actually believe mod_perl is superior to (F)CGI or a PSGI server reverse proxy.
Re: Running Mod_Perl with Mojolicious in Docker
#9Earlier quoted context omitted.
Actually this setup uses Plack, a framework whose first version was released in 2009.
What are the reasons to use mod_perl in 2023? Plack FastCGI behind nginx looks like a better option.
Re: Running Mod_Perl with Mojolicious in Docker
#10Earlier quoted context omitted.
What are the reasons to use mod_perl in 2023? Plack FastCGI behind nginx looks like a better option.
Article writer here. A lot of our CI/CD is designed around mod_perl, and in-place updates. We run NewRelic configured to monitor Apache, which stops us from having to roll our own NewRelic connection through a CPAN module that we'd have to audit. In general for our needs, I actually believe mod_perl is superior to (F)CGI or a PSGI server reverse proxy.