Docker image use database location in WORKDIR.

Passes `--db ./data.db` to entrypoint `bashhub-server` as default
arguments to persist database files in docker volume /data.
This commit is contained in:
blackhogz 2020-05-23 20:56:57 -07:00
parent 23be9550f4
commit 54fa5fb65a
2 changed files with 3 additions and 2 deletions

View file

@ -54,4 +54,5 @@ WORKDIR /data
# Expose port for live server # Expose port for live server
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["bashhub-server"] ENTRYPOINT ["bashhub-server"]
CMD [ "--db", "./data.db"]

View file

@ -81,7 +81,7 @@ $ bashhub-server
2020/02/10 03:04:11 Listening and serving HTTP on http://0.0.0.0:8080 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 $ docker run -d -p 8080:8080 --name bashhub-server nicksherron/bashhub-server