Implement Dockerfile

This commit is contained in:
swag 2021-12-30 20:52:34 -05:00
parent 320e22d4d6
commit 3b6927ecfb
2 changed files with 34 additions and 1 deletions

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM perl:5.34
# Move it
WORKDIR /opt
COPY assets/ ./assets/
COPY lib/ ./lib/
COPY migrations/ ./migrations/
COPY public/ ./public/
COPY t/ ./t/
COPY templates/ ./templates/
COPY cpanfile .
COPY guestbook-ng.conf .
COPY guestbook-ng.pl .
# Dependency time
RUN apt-get update
RUN apt-get -y upgrade
RUN cpanm --installdeps .
# Test it
RUN prove -l -v
# Finish setting up the environment
ENV MOJO_REVERSE_PROXY=1
EXPOSE 3000
# Send it
CMD ["perl", "guestbook-ng.pl", "prefork", "-m", "development"]

View File

@ -41,6 +41,12 @@ Mojolicious blockchain technologies powered by AI.
Add the `-v` option for more verbose output Add the `-v` option for more verbose output
## Docker
### Build
docker build -t guestbook-ng .
## TODOs ## TODOs
1. Input validation 1. Input validation
@ -48,5 +54,4 @@ Add the `-v` option for more verbose output
1. Flash error for CAPTCHA failures and what nots 1. Flash error for CAPTCHA failures and what nots
1. Replace HTML tables with CSS grids(!!) 1. Replace HTML tables with CSS grids(!!)
1. Add column to tag posts as spam or hidden 1. Add column to tag posts as spam or hidden
1. Dockerfile
1. Add homepage/URL field 1. Add homepage/URL field