Skip to content

Commit

Permalink
fix: docker image and volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
depado committed Aug 17, 2024
1 parent ccb61d8 commit e631e4a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 3 additions & 3 deletions Dockerfile.pack
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit e631e4a

Please sign in to comment.