diff --git a/Dockerfile b/Dockerfile index ed7ad00..f74b522 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,6 @@ RUN make tmp # Final Step FROM gcr.io/distroless/static COPY --from=builder /tmp/smallblog /go/bin/smallblog -VOLUME [ "/data" ] -WORKDIR /data -ENTRYPOINT ["/go/bin/smallblog"] +COPY templates ./templates +COPY assets ./assets +ENTRYPOINT ["/go/bin/smallblog", "--server.host=0.0.0.0"] diff --git a/Dockerfile.pack b/Dockerfile.pack index 2142588..e50577d 100644 --- a/Dockerfile.pack +++ b/Dockerfile.pack @@ -18,6 +18,6 @@ RUN upx --best --lzma /tmp/smallblog # Final Step FROM gcr.io/distroless/static COPY --from=builder /tmp/smallblog /go/bin/smallblog -VOLUME [ "/data" ] -WORKDIR /data -ENTRYPOINT ["/go/bin/smallblog"] +COPY templates ./templates +COPY assets ./assets +ENTRYPOINT ["/go/bin/smallblog", "--server.host=0.0.0.0"] diff --git a/README.md b/README.md index 59040be..311aefd 100644 --- a/README.md +++ b/README.md @@ -250,3 +250,10 @@ server. Which means several things : All these changes are instant. Usually a file takes ~250µs to be parsed. When you restart the server, all the files will be parsed again so they are stored in RAM (which is really efficient unless you have 250MB of markdown file). + +## Docker usage + +```sh +$ docker pull ghcr.io/depado/smallblog:2.1.5 +$ docker run -p 8080:8080 -v $PWD/pages:/pages ghcr.io/depado/smallblog:2.1.5 serve +```