From 963b7e74f3bff795027ba7bec72357523e7c79d3 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Sat, 17 Apr 2021 16:21:41 -0400 Subject: [PATCH] Some updates - Pull latest Perl image - Run apt updates - Use prefork server - Clean up Dockerfile --- Dockerfile | 19 ++++++++++++++++--- README.md | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5b184c..bfd3c94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,21 @@ -FROM perl:5.22 -RUN cpanm Mojolicious +FROM perl:5.32.1 + +# Move it WORKDIR /opt COPY public/ ./public/ COPY templates/ ./templates/ COPY wethepeople.pl . + +# Upgrade +RUN apt-get update +RUN apt-get -y upgrade + +# Install Mojo +RUN cpanm Mojolicious + +# Set up environment ENV MOJO_REVERSE_PROXY=1 -CMD ["perl", "wethepeople.pl", "daemon", "-m", "production"] +EXPOSE 3000 + +# Send it +CMD ["perl", "wethepeople.pl", "prefork", "-m", "production"] diff --git a/README.md b/README.md index 92af5c3..aca4f00 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,25 @@ # wethepeople.win Source code for http://wethepeople.win + +## Building/Testing + +### Build the container locally + + docker build -t wethepeople.pl . + +### Run it locally + + docker run -p 3000:3000 wethepeople.pl:latest + +Pull up [http://localhost:3000](http://localhost:3000) and poke around + +## Tagging/Pushing + +### Tag the image + + docker tag wethepeople.pl gcr.io/www-swagg/wethepeople.pl + +### Send it + + docker push gcr.io/www-swagg/wethepeople.pl