1
0
Fork 0
mirror of https://github.com/imtbl/hydrus-server-docker synced 2024-06-01 10:20:21 +12:00

feat: Add default volume

This commit is contained in:
Michael Serajnik 2019-03-24 12:53:53 +01:00
parent 9f8d208d48
commit 14de3dc1b6
No known key found for this signature in database
GPG key ID: B390A5CBA3ECB74D
3 changed files with 17 additions and 3 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased] ## [Unreleased]
### Added
+ Added default volume
### Changed ### Changed
+ Updated hydrus server version + Updated hydrus server version

View file

@ -67,6 +67,8 @@ HEALTHCHECK --interval=1m --timeout=10s --retries=3 \
CMD wget --quiet --tries=1 --no-check-certificate --spider \ CMD wget --quiet --tries=1 --no-check-certificate --spider \
https://localhost:45870 || exit 1 https://localhost:45870 || exit 1
VOLUME /data
USER hydrus USER hydrus
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint"]

View file

@ -95,9 +95,10 @@ repositories. You will generally have two (one for tags and one for files), but
if you add more, you will also need to expose additional ports. if you add more, you will also need to expose additional ports.
Per default, hydrus-server-docker stores its databases and media inside the Per default, hydrus-server-docker stores its databases and media inside the
`/data` directory. It is highly recommended to create a named volume and mount `/data` directory which is a mount point that is persisted as a volume. A new
it to the same location if you wish to persist the data beyond the lifetime of volume will be created every time a container is created, making it less ideal
the container and/or access it on the host: as a long-term solution. Instead, you should create a named volume yourself and
mount that over it instead:
```zsh ```zsh
user@local:~$ docker volume create hydrus-server-data user@local:~$ docker volume create hydrus-server-data
@ -110,6 +111,13 @@ example with all the options mentioned above:
user@local:~$ docker run -p 45870:45870 -p 45871:45871 -p 45872:45872 -v hydrus-server-data:/data -d mserajnik/hydrus-server-docker user@local:~$ docker run -p 45870:45870 -p 45871:45871 -p 45872:45872 -v hydrus-server-data:/data -d mserajnik/hydrus-server-docker
``` ```
Specifying the same named volume every time a container is created gives each
of these instances access to the same persisted data.
Of course, using a bind mount instead of a named volume is also possible but
for performance reasons only recommended if you need easy access to the data on
the host machine.
### Additional configuration when building ### Additional configuration when building
#### UID/GID #### UID/GID