Dockerfile, some docs and dependency
This commit is contained in:
parent
6515e3291c
commit
4554ed2e74
28
Dockerfile
Normal file
28
Dockerfile
Normal 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"]
|
26
README.md
26
README.md
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[css-min:css/PostText.css]
|
||||
checksum=942e7be1d2
|
||||
checksum=3698d7bf52
|
||||
format=css
|
||||
minified=1
|
||||
[css-min:https://unpkg.com/98.css]
|
||||
|
|
Loading…
Reference in a new issue