Some updates
- Pull latest Perl image - Run apt updates - Use prefork server - Clean up Dockerfile
This commit is contained in:
parent
471d77208c
commit
963b7e74f3
19
Dockerfile
19
Dockerfile
|
@ -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"]
|
||||||
|
|
22
README.md
22
README.md
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user