Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
.gitignore
|
||||||
|
pom.xml
|
||||||
|
target/
|
||||||
|
!target/dependency/*
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
FROM alpine:3.6
|
||||||
|
|
||||||
|
LABEL description="Airsonic is a free, web-based media streamer, providing ubiquitious access to your music." \
|
||||||
|
url="https://github.com/airsonic/airsonic"
|
||||||
|
|
||||||
|
ENV AIRSONIC_PORT=4040 AIRSONIC_DIR=/airsonic
|
||||||
|
|
||||||
|
WORKDIR $AIRSONIC_DIR
|
||||||
|
|
||||||
|
RUN apk --no-cache add \
|
||||||
|
ffmpeg \
|
||||||
|
lame \
|
||||||
|
bash \
|
||||||
|
libressl \
|
||||||
|
ca-certificates \
|
||||||
|
tini \
|
||||||
|
openjdk8-jre
|
||||||
|
|
||||||
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
|
COPY target/dependency/airsonic-main.war airsonic.war
|
||||||
|
|
||||||
|
EXPOSE $AIRSONIC_PORT
|
||||||
|
|
||||||
|
VOLUME $AIRSONIC_DIR/data $AIRSONIC_DIR/music $AIRSONIC_DIR/playlists $AIRSONIC_DIR/podcasts
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "--", "run.sh"]
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
<artifactId>airsonic</artifactId>
|
||||||
|
<version>6.3-SNAPSHOT</version>
|
||||||
|
<groupId>org.airsonic.player</groupId>
|
||||||
|
</parent>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<artifactId>airsonic-docker</artifactId>
|
||||||
|
<name>Airsonic Docker Image</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.airsonic.player</groupId>
|
||||||
|
<artifactId>airsonic-main</artifactId>
|
||||||
|
<version>6.3-SNAPSHOT</version>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.spotify</groupId>
|
||||||
|
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||||
|
<version>1.3.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default</id>
|
||||||
|
<goals>
|
||||||
|
<goal>build</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>package</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<repository>airsonic/airsonic</repository>
|
||||||
|
<tag>${project.version}</tag>
|
||||||
|
<retryCount>0</retryCount>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<configuration>
|
||||||
|
<stripClassifier>true</stripClassifier>
|
||||||
|
<stripVersion>true</stripVersion>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
Executable
+28
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
mkdir -p $AIRSONIC_DIR/data/transcode
|
||||||
|
ln -fs /usr/bin/ffmpeg $AIRSONIC_DIR/data/transcode/ffmpeg
|
||||||
|
ln -fs /usr/bin/lame $AIRSONIC_DIR/data/transcode/lame
|
||||||
|
|
||||||
|
if [[ $# -lt 1 ]] || [[ ! "$1" == "java"* ]]; then
|
||||||
|
|
||||||
|
java_opts_array=()
|
||||||
|
while IFS= read -r -d '' item; do
|
||||||
|
java_opts_array+=( "$item" )
|
||||||
|
done < <([[ $JAVA_OPTS ]] && xargs printf '%s\0' <<<"$JAVA_OPTS")
|
||||||
|
exec java -Xmx256m \
|
||||||
|
-Dserver.host=0.0.0.0 \
|
||||||
|
-Dserver.port=$AIRSONIC_PORT \
|
||||||
|
-Dserver.contextPath=/ \
|
||||||
|
-Dairsonic.home=$AIRSONIC_DIR/data \
|
||||||
|
-Dairsonic.defaultMusicFolder=$AIRSONIC_DIR/musics \
|
||||||
|
-Dairsonic.defaultPodcastFolder=$AIRSONIC_DIR/podcasts \
|
||||||
|
-Dairsonic.defaultPlaylistFolder=$AIRSONIC_DIR/playlists \
|
||||||
|
-Djava.awt.headless=true \
|
||||||
|
"${java_opts_array[@]}" \
|
||||||
|
-jar airsonic.war "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
@@ -221,4 +221,16 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>docker</id>
|
||||||
|
<modules>
|
||||||
|
<module>subsonic-rest-api</module>
|
||||||
|
<module>airsonic-sonos-api</module>
|
||||||
|
<module>airsonic-main</module>
|
||||||
|
<module>install/docker</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user