Add PORT and CONTEXT_PATH env variables
This commit is contained in:
parent
d3886e0663
commit
c98c6793a4
2 changed files with 15 additions and 7 deletions
10
Dockerfile
10
Dockerfile
|
@ -2,6 +2,8 @@ FROM java:8
|
||||||
MAINTAINER Cyrille Nofficial<cynoffic@cyrilix.fr>
|
MAINTAINER Cyrille Nofficial<cynoffic@cyrilix.fr>
|
||||||
|
|
||||||
ENV SUBSONIC_VERSION 5.2.1
|
ENV SUBSONIC_VERSION 5.2.1
|
||||||
|
ENV PORT 8080
|
||||||
|
ENV CONTEXT_PATH /
|
||||||
|
|
||||||
LABEL version="$SUBSONIC_VERSION"
|
LABEL version="$SUBSONIC_VERSION"
|
||||||
LABEL description="Subsonic media streamer"
|
LABEL description="Subsonic media streamer"
|
||||||
|
@ -13,18 +15,16 @@ RUN mkdir -p /opt/subsonic /opt/data /opt/music/ &&\
|
||||||
VOLUME /opt/data
|
VOLUME /opt/data
|
||||||
VOLUME /opt/music/
|
VOLUME /opt/music/
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE $PORT
|
||||||
WORKDIR /opt/subsonic
|
WORKDIR /opt/subsonic
|
||||||
|
|
||||||
CMD java -Xmx100m \
|
CMD java -Xmx100m \
|
||||||
-Dsubsonic.home=/opt/data \
|
-Dsubsonic.home=/opt/data \
|
||||||
-Dsubsonic.port=8080 \
|
-Dsubsonic.port=$PORT \
|
||||||
-Dsubsonic.contextPath=/ \
|
-Dsubsonic.contextPath=$CONTEXT_PATH \
|
||||||
-Dsubsonic.defaultMusicFolder=/opt/music/ \
|
-Dsubsonic.defaultMusicFolder=/opt/music/ \
|
||||||
-Dsubsonic.defaultPodcastFolder=/opt/music/ \
|
-Dsubsonic.defaultPodcastFolder=/opt/music/ \
|
||||||
-Dsubsonic.defaultPlaylistFolder=/opt/music/ \
|
-Dsubsonic.defaultPlaylistFolder=/opt/music/ \
|
||||||
-Djava.awt.headless=true \
|
-Djava.awt.headless=true \
|
||||||
-verbose:gc \
|
-verbose:gc \
|
||||||
-jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar
|
-jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar
|
||||||
|
|
||||||
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -17,11 +17,11 @@ $ docker build -t <your-name>/docker-subsonic .
|
||||||
A current image is available as a trusted build from the Docker index:
|
A current image is available as a trusted build from the Docker index:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ docker pull cyrilix/docker-subsonic
|
$ docker pull cyrilix/subsonic
|
||||||
```
|
```
|
||||||
|
|
||||||
The repository page is at
|
The repository page is at
|
||||||
https://index.docker.io/u/cyrilix/docker-subsonic/
|
https://index.docker.io/u/cyrilix/subsonic/
|
||||||
|
|
||||||
|
|
||||||
## Run a container with this image
|
## Run a container with this image
|
||||||
|
@ -34,3 +34,11 @@ $ docker run \
|
||||||
<your-name>/subsonic
|
<your-name>/subsonic
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Specify env variables:
|
||||||
|
|
||||||
|
* CONTEXT_PATH = The context path, i.e., the last part of the Subsonic URL. Typically '/' or '/subsonic'. Default '/'
|
||||||
|
* PORT = The port on which Subsonic will listen for incoming HTTP traffic. Default: 8080
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue