Skip to content

Commit

Permalink
Docker image use database location in WORKDIR.
Browse files Browse the repository at this point in the history
Passes `--db ./data.db` to entrypoint `bashhub-server` as default
arguments to persist database files in docker volume /data.
  • Loading branch information
blackhogz committed May 24, 2020
1 parent 23be955 commit 54fa5fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ WORKDIR /data
# Expose port for live server
EXPOSE 8080

ENTRYPOINT ["bashhub-server"]
ENTRYPOINT ["bashhub-server"]
CMD [ "--db", "./data.db"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $ bashhub-server
2020/02/10 03:04:11 Listening and serving HTTP on http://0.0.0.0:8080
```
or on docker
or on docker (backend database files are persisted in container volume `/data`)

```
$ docker run -d -p 8080:8080 --name bashhub-server nicksherron/bashhub-server
Expand Down

0 comments on commit 54fa5fb

Please sign in to comment.