Dockerfile, some docs and dependency

This commit is contained in:
swagg boi 2023-04-25 15:10:31 -04:00
parent 6515e3291c
commit 4554ed2e74
4 changed files with 56 additions and 1 deletions

28
Dockerfile Normal file
View file

@ -0,0 +1,28 @@
FROM perl:5.36
# Move it
WORKDIR /opt
COPY assets/ ./assets/
COPY lib/ ./lib/
COPY migrations/ ./migrations/
COPY public/ ./public/
COPY t/ ./t/
COPY templates/ ./templates/
COPY script/ ./script/
COPY cpanfile .
COPY post_text.conf .
# 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", "script/post_text", "prefork", "-m", "production"]

View file

@ -30,6 +30,32 @@ Run the tests locally (against development environment):
prove -l
## Building/running container
### Build
podman build -t post_text .
### Tag
podman tag post_text git.n4vn33t.com/swag/post_text
### Push
podman push git.n4vn33t.com/swag/post_text
### Pull
podman pull git.n4vn33t.com/swag/post_text
### Run
podman run -dt --rm --name post_text -p 3002:3000 post_text:latest
### Generate unit file
podman generate systemd --files --new --name post_text
## TODOs
1. Rules/about page

View file

@ -1,5 +1,5 @@
[css-min:css/PostText.css]
checksum=942e7be1d2
checksum=3698d7bf52
format=css
minified=1
[css-min:https://unpkg.com/98.css]

View file

@ -7,3 +7,4 @@ requires 'Crypt::Passphrase::Bcrypt'; # Needed for old passphrases
requires 'Perl::Critic::Community';
requires 'Date::Format';
requires 'XML::RSS';
requires 'CSS::Minifier::XS';