Initial commit

This commit is contained in:
Sebastian Hugentobler 2017-10-19 13:48:38 +02:00
commit 1355ed7fa2
8 changed files with 74 additions and 0 deletions

9
.editorconfig Normal file
View File

@ -0,0 +1,9 @@
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

3
.gitignore vendored Executable file
View File

@ -0,0 +1,3 @@
*~
.DS_Store
*.swp

10
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,10 @@
build:
image: docker:latest
services:
- docker:dind
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM registry.gitlab.com/thallian/docker-alpine-s6:master
ENV VERSION v10.0.1
ENV AIRSONIC_DIR /home/airsonic
RUN apk add --no-cache openjdk8-jre libressl ca-certificates ffmpeg flac opus lame
RUN addgroup -g 2222 airsonic
RUN adduser -h ${AIRSONIC_DIR} -S -D -u 2222 -G airsonic airsonic
RUN wget https://github.com/airsonic/airsonic/releases/download/${VERSION}/airsonic.war -O ${AIRSONIC_DIR}/airsonic.war
RUN chown -R airsonic:airsonic ${AIRSONIC_DIR}
RUN mkdir -p $AIRSONIC_DIR/data/transcode
RUN ln -fs /usr/bin/ffmpeg $AIRSONIC_DIR/data/transcode/ffmpeg
RUN ln -fs /usr/bin/lame $AIRSONIC_DIR/data/transcode/lame
RUN chmod +x $AIRSONIC_DIR/data/transcode/ffmpeg
RUN chmod +x $AIRSONIC_DIR/data/transcode/lame
ADD /rootfs /
EXPOSE 8080
VOLUME ${AIRSONIC_DIR}/data ${AIRSONIC_DIR}/music ${AIRSONIC_DIR}/playlists ${AIRSONIC_DIR}/podcasts

10
README.md Normal file
View File

@ -0,0 +1,10 @@
Airsonic (https://github.com/airsonic/airsonic) server (am open source fork of Subsonic).
# Volumes
- `/home/airsonic/data`
- `/home/airsonic/music`
- `/home/airsonic/playlists`
- `/home/airsonic/podcasts`
# Ports
- 8080

3
rootfs/bin/restart-services Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv sh
s6-svc -t /var/run/s6/services/murmur

View File

@ -0,0 +1,3 @@
/home/airsonic/data true airsonic 0640 0750
/home/airsonic/playlists true airsonic 0640 0750
/home/airsonic/podcasts true airsonic 0640 0750

View File

@ -0,0 +1,13 @@
#!/usr/bin/with-contenv sh
cd /${AIRSONIC_DIR}
exec s6-setuidgid airsonic java -Xmx512m \
-Dserver.host=0.0.0.0 \
-Dserver.port=8080 \
-Dserver.contextPath=/ \
-Dairsonic.home=${AIRSONIC_DIR}/data \
-Dairsonic.defaultMusicFolder=${AIRSONIC_DIR}/music \
-Dairsonic.defaultPodcastFolder=${AIRSONIC_DIR}/podcasts \
-Dairsonic.defaultPlaylistFolder=${AIRSONIC_DIR}/playlists \
-Djava.awt.headless=true \
-jar airsonic.war