diff --git a/Dockerfile b/Dockerfile index 398ddab..f018dfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ FROM java:8 MAINTAINER Cyrille Nofficial ENV SUBSONIC_VERSION 5.2.1 +ENV PORT 8080 +ENV CONTEXT_PATH / LABEL version="$SUBSONIC_VERSION" LABEL description="Subsonic media streamer" @@ -13,18 +15,16 @@ RUN mkdir -p /opt/subsonic /opt/data /opt/music/ &&\ VOLUME /opt/data VOLUME /opt/music/ -EXPOSE 8080 +EXPOSE $PORT WORKDIR /opt/subsonic CMD java -Xmx100m \ -Dsubsonic.home=/opt/data \ - -Dsubsonic.port=8080 \ - -Dsubsonic.contextPath=/ \ + -Dsubsonic.port=$PORT \ + -Dsubsonic.contextPath=$CONTEXT_PATH \ -Dsubsonic.defaultMusicFolder=/opt/music/ \ -Dsubsonic.defaultPodcastFolder=/opt/music/ \ -Dsubsonic.defaultPlaylistFolder=/opt/music/ \ -Djava.awt.headless=true \ -verbose:gc \ -jar /opt/subsonic/subsonic-booter-jar-with-dependencies.jar - - diff --git a/README.md b/README.md index 5adefac..3c4a807 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,11 @@ $ docker build -t /docker-subsonic . A current image is available as a trusted build from the Docker index: ```shell -$ docker pull cyrilix/docker-subsonic +$ docker pull cyrilix/subsonic ``` 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 @@ -34,3 +34,11 @@ $ docker run \ /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 +