2018-11-30 04:49:02 +13:00
|
|
|
# hydrus-server-docker [![hydrus server version][hydrus-server-badge]][hydrus-server-version] [![Build status][travis-badge]][travis] [![Docker Hub build][docker-hub-badge]][docker-hub]
|
2018-11-29 00:07:46 +13:00
|
|
|
|
2019-05-19 03:53:59 +12:00
|
|
|
> [hydrus server][hydrus-server] running on Debian
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2021-03-16 07:17:31 +13:00
|
|
|
__Unmaintained:__ this project is no longer maintained. I suggest you check out
|
|
|
|
[suika/hydrus][hydrus-docker] as an alternative (Docker images for both hydrus
|
|
|
|
client and server are provided).
|
|
|
|
|
2019-05-19 03:53:59 +12:00
|
|
|
This is a simple Debian-based Docker setup for running
|
2019-03-15 05:32:22 +13:00
|
|
|
[hydrus server][hydrus-server] from source.
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2021-02-26 05:07:08 +13:00
|
|
|
The latest build runs [hydrus server version 430][hydrus-server-version].
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
## Table of contents
|
|
|
|
|
|
|
|
+ [Install](#install)
|
|
|
|
+ [Dependencies](#dependencies)
|
|
|
|
+ [Updating](#updating)
|
2020-10-22 11:37:28 +13:00
|
|
|
+ [Upgrading from 3.x to 4.x](#upgrading-from-3x-to-4x)
|
2019-05-19 04:01:34 +12:00
|
|
|
+ [Upgrading from 2.x to 3.x](#upgrading-from-2x-to-3x)
|
2019-01-20 02:51:48 +13:00
|
|
|
+ [Upgrading from 1.x to 2.x](#upgrading-from-1x-to-2x)
|
2018-11-30 04:49:02 +13:00
|
|
|
+ [Usage](#usage)
|
2020-01-06 08:49:12 +13:00
|
|
|
+ [Ports](#ports)
|
|
|
|
+ [Storage](#storage)
|
2018-11-30 04:49:02 +13:00
|
|
|
+ [Maintainer](#maintainer)
|
|
|
|
+ [Contribute](#contribute)
|
|
|
|
+ [License](#license)
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
The easiest way to install is via [Docker Hub][docker-hub]:
|
|
|
|
|
|
|
|
```zsh
|
2020-06-14 11:52:44 +12:00
|
|
|
user@local:~$ docker pull mtbl/hydrus-server-docker
|
2018-11-30 04:49:02 +13:00
|
|
|
```
|
|
|
|
|
|
|
|
By default, this will pull the latest build. To specify an image with a
|
|
|
|
specific version of hydrus server, provide the version number as tag, e.g.:
|
|
|
|
|
|
|
|
```zsh
|
2021-02-26 05:07:08 +13:00
|
|
|
user@local:~$ docker pull mtbl/hydrus-server-docker:430
|
2018-11-30 04:49:02 +13:00
|
|
|
```
|
|
|
|
|
2020-01-07 12:32:00 +13:00
|
|
|
Alternatively, you can also build the image yourself:
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
```zsh
|
2020-06-14 11:52:44 +12:00
|
|
|
user@local:~$ git clone --recurse-submodules https://github.com/imtbl/hydrus-server-docker.git
|
2018-11-30 04:49:02 +13:00
|
|
|
user@local:~$ cd hydrus-server-docker
|
|
|
|
user@local:hydrus-server-docker$ docker build . -t hydrus-server-docker
|
|
|
|
```
|
|
|
|
|
2020-01-07 12:32:00 +13:00
|
|
|
The user that is used inside the container has UID `1000` and GID `1000` by
|
|
|
|
default. You can adjust this (e.g., to match your host UID/GID) by providing
|
|
|
|
the arguments `USER_ID` and `GROUP_ID` when making a build.
|
|
|
|
|
2018-11-30 04:49:02 +13:00
|
|
|
### Dependencies
|
|
|
|
|
|
|
|
+ [Docker][docker]
|
|
|
|
|
|
|
|
### Updating
|
|
|
|
|
|
|
|
If you have installed via Docker Hub, just pull the updated image. Otherwise,
|
2019-01-20 02:51:48 +13:00
|
|
|
pull from this repository and make a new build.
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
This repository follows [semantic versioning][semantic-versioning] and any
|
|
|
|
breaking changes that require additional attention will be released under a new
|
|
|
|
major version (e.g., `2.0.0`). Minor version updates (e.g., `1.1.0` or `1.2.0`)
|
|
|
|
are therefore always safe to simply install via the routine mentioned before.
|
|
|
|
|
|
|
|
When necessary, this section will be expanded with upgrade guides to new major
|
|
|
|
versions.
|
|
|
|
|
2020-10-22 11:37:28 +13:00
|
|
|
#### Upgrading from 3.x to 4.x
|
|
|
|
|
|
|
|
Upgrading from `3.x` to `4.x` can be done via pulling the updated image from
|
|
|
|
Docker Hub or building it yourself and requires no further manual changes.
|
|
|
|
|
|
|
|
`4.0.0` has introduced no breaking changes and merely reflects the switch to a
|
|
|
|
new license (AGPLv3).
|
|
|
|
|
2019-05-19 04:01:34 +12:00
|
|
|
#### Upgrading from 2.x to 3.x
|
|
|
|
|
|
|
|
Upgrading from `2.x` to `3.x` can be done via pulling the updated image from
|
|
|
|
Docker Hub or building it yourself and requires no further manual changes.
|
|
|
|
|
|
|
|
Due to the introduction of OpenCV to hydrus server (which is hard to build on
|
2020-10-22 10:38:09 +13:00
|
|
|
Alpine), the Docker image is now based on Debian instead of Alpine.
|
2019-05-19 04:01:34 +12:00
|
|
|
|
2019-01-20 02:51:48 +13:00
|
|
|
#### Upgrading from 1.x to 2.x
|
|
|
|
|
|
|
|
Upgrading from `1.x` to `2.x` can be done via pulling the updated image from
|
|
|
|
Docker Hub or building it yourself and requires no further manual changes.
|
|
|
|
|
|
|
|
Since there have been issues with running the pre-compiled version of hydrus
|
|
|
|
server 335+ (which made the switch to Python 3) on the previous Docker setup,
|
|
|
|
starting with `2.0.0`, the Docker image is now based on Alpine (instead of
|
|
|
|
Debian) and runs hydrus server from source.
|
|
|
|
|
|
|
|
This approximately halves the resulting image size while at the same time
|
|
|
|
making it easier to adapt for future changes/dependencies.
|
|
|
|
|
2018-11-30 04:49:02 +13:00
|
|
|
## Usage
|
|
|
|
|
2020-01-06 08:49:12 +13:00
|
|
|
### Ports
|
|
|
|
|
2020-10-22 10:38:09 +13:00
|
|
|
First, you need to bind the exposed ports. This can be done automatically using
|
|
|
|
`-P` but it is recommended to bind them manually instead since having changing
|
|
|
|
ports every time you run a new container might be annoying when used in
|
|
|
|
combination with other services.
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
hydrus-server-docker exposes the following three ports by default:
|
|
|
|
|
|
|
|
+ `45870/tcp`
|
|
|
|
+ `45871/tcp`
|
|
|
|
+ `45872/tcp`
|
|
|
|
|
|
|
|
These are used to access the different services. `45870` is the default port
|
|
|
|
for the server administration service while `45871` and `45872` are used for
|
|
|
|
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.
|
|
|
|
|
2020-01-06 08:49:12 +13:00
|
|
|
### Storage
|
|
|
|
|
2018-11-30 09:47:38 +13:00
|
|
|
Per default, hydrus-server-docker stores its databases and media inside the
|
2019-03-25 00:53:53 +13:00
|
|
|
`/data` directory which is a mount point that is persisted as a volume. A new
|
|
|
|
volume will be created every time a container is created, making it less ideal
|
|
|
|
as a long-term solution. Instead, you should create a named volume yourself and
|
2019-04-13 23:38:13 +12:00
|
|
|
mount that over it:
|
2018-11-30 09:47:38 +13:00
|
|
|
|
|
|
|
```zsh
|
|
|
|
user@local:~$ docker volume create hydrus-server-data
|
|
|
|
```
|
|
|
|
|
2020-01-07 12:32:00 +13:00
|
|
|
After creating your named volume, you can run the container. Here is a full
|
|
|
|
example with all the options mentioned above:
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
```zsh
|
2020-06-14 11:52:44 +12:00
|
|
|
user@local:~$ docker run -p 45870:45870 -p 45871:45871 -p 45872:45872 -v hydrus-server-data:/data -d mtbl/hydrus-server-docker
|
2018-11-30 04:49:02 +13:00
|
|
|
```
|
|
|
|
|
2019-03-25 00:53:53 +13:00
|
|
|
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.
|
|
|
|
|
2018-11-30 04:49:02 +13:00
|
|
|
## Maintainer
|
|
|
|
|
2020-06-14 11:52:44 +12:00
|
|
|
[imtbl][maintainer]
|
2018-11-30 04:49:02 +13:00
|
|
|
|
|
|
|
## Contribute
|
|
|
|
|
|
|
|
You are welcome to help out!
|
|
|
|
|
|
|
|
[Open an issue][issues] or submit a pull request.
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
2020-10-22 10:43:14 +13:00
|
|
|
[AGPLv3](LICENSE) © imtbl
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2021-03-16 07:17:31 +13:00
|
|
|
[hydrus-docker]: https://hub.docker.com/r/suika/hydrus
|
2018-11-30 04:49:02 +13:00
|
|
|
[hydrus-server]: http://hydrusnetwork.github.io/hydrus/
|
2021-02-26 05:07:08 +13:00
|
|
|
[hydrus-server-version]: https://github.com/hydrusnetwork/hydrus/releases/tag/v430
|
2020-06-14 11:52:44 +12:00
|
|
|
[docker-hub]: https://hub.docker.com/r/mtbl/hydrus-server-docker/
|
|
|
|
[docker-hub-tags]: https://hub.docker.com/r/mtbl/hydrus-server-docker/tags/
|
2018-11-30 04:49:02 +13:00
|
|
|
[docker]: https://www.docker.com/
|
|
|
|
[semantic-versioning]: https://semver.org/
|
|
|
|
|
2021-02-26 05:07:08 +13:00
|
|
|
[hydrus-server-badge]: https://img.shields.io/badge/hydrus%20server-version%20430-blue.svg
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2020-06-14 11:52:44 +12:00
|
|
|
[travis]: https://travis-ci.com/imtbl/hydrus-server-docker
|
|
|
|
[travis-badge]: https://travis-ci.com/imtbl/hydrus-server-docker.svg
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2020-10-22 10:38:09 +13:00
|
|
|
[docker-hub-badge]: https://img.shields.io/docker/cloud/automated/mtbl/hydrus-server-docker.svg
|
2018-11-30 04:49:02 +13:00
|
|
|
|
2020-06-14 11:52:44 +12:00
|
|
|
[maintainer]: https://github.com/imtbl
|
|
|
|
[issues]: https://github.com/imtbl/hydrus-server-docker/issues/new
|