tidy up init and services files

This commit is contained in:
sparklyballs
2016-08-07 00:51:20 +01:00
parent b3cf4b9596
commit ee059ef201
3 changed files with 29 additions and 19 deletions
+18 -15
View File
@@ -1,24 +1,27 @@
FROM lsiobase/alpine.python
MAINTAINER sparklyballs
# install sabnzbd
RUN \
mkdir -p \
/app/sabnzbd && \
LATEST_RELEASE=$(curl -sX GET "https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest" | \
awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/sabnzbd.tar.gz -L \
https://github.com/sabnzbd/sabnzbd/releases/download/"${LATEST_RELEASE}"/SABnzbd-"${LATEST_RELEASE}"-src.tar.gz && \
tar xf \
/tmp/sabnzbd.tar.gz -C \
/app/sabnzbd --strip-components=1 && \
# cleanup
rm -f \
/tmp/*
# add local files
COPY root/ /
# install sabnzbd
RUN \
mkdir -p /app/sabnzbd && \
LATEST_RELEASE=$(curl -sX GET "https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest" | \
awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/sabnzbd.tar.gz -L \
https://github.com/sabnzbd/sabnzbd/releases/download/"${LATEST_RELEASE}"/SABnzbd-"${LATEST_RELEASE}"-src.tar.gz && \
tar xf /tmp/sabnzbd.tar.gz -C \
/app/sabnzbd --strip-components=1 && \
# cleanup
rm -f /tmp/*
# ports and volumes
VOLUME /config /downloads /incomplete-downloads
EXPOSE 8080 9090
+8 -3
View File
@@ -1,8 +1,13 @@
#!/usr/bin/with-contenv bash
# make folders
mkdir -p /downloads /incomplete-downloads
mkdir -p \
/downloads \
/incomplete-downloads
# permissions
chown -R abc:abc /app/sabnzbd
chown abc:abc /downloads /incomplete-downloads
chown -R abc:abc \
/app/sabnzbd
chown abc:abc \
/downloads \
/incomplete-downloads
+3 -1
View File
@@ -1,3 +1,5 @@
#!/usr/bin/with-contenv bash
s6-setuidgid abc python /app/sabnzbd/SABnzbd.py -f /config/sabnzbd.ini -b 0 -s 0.0.0.0:8080
exec \
s6-setuidgid abc python /app/sabnzbd/SABnzbd.py \
-f /config/sabnzbd.ini -b 0 -s 0.0.0.0:8080