Some updates

- Pull latest Perl image
- Run apt updates
- Use prefork server
- Clean up Dockerfile
This commit is contained in:
swaggboi 2021-04-17 16:21:41 -04:00
parent 471d77208c
commit 963b7e74f3
2 changed files with 38 additions and 3 deletions

View File

@ -1,8 +1,21 @@
FROM perl:5.22 FROM perl:5.32.1
RUN cpanm Mojolicious
# Move it
WORKDIR /opt WORKDIR /opt
COPY public/ ./public/ COPY public/ ./public/
COPY templates/ ./templates/ COPY templates/ ./templates/
COPY wethepeople.pl . 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 ENV MOJO_REVERSE_PROXY=1
CMD ["perl", "wethepeople.pl", "daemon", "-m", "production"] EXPOSE 3000
# Send it
CMD ["perl", "wethepeople.pl", "prefork", "-m", "production"]

View File

@ -1,3 +1,25 @@
# wethepeople.win # wethepeople.win
Source code for http://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