Move container image to my registry

This commit is contained in:
Neale Pickett 2022-11-06 10:34:43 -07:00
parent c15681a51c
commit 39c26fffa6
6 changed files with 14 additions and 15 deletions

View File

@ -7,19 +7,13 @@ RUN true \
&& sed -i 's/main$/main contrib non-free/' /etc/apt/sources.list \ && sed -i 's/main$/main contrib non-free/' /etc/apt/sources.list \
&& apt-get -y update \ && apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \ && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
dvdbackup \ dvdbackup lsdvd libdvd-pkg libdvdcss2 \
libdvd-pkg libdvdcss2 \
handbrake-cli libavcodec-extra \
cd-discid cdparanoia lame \ cd-discid cdparanoia lame \
python3 \ handbrake-cli libavcodec-extra \
python3-slugify \ python3 python3-slugify \
&& true && true
RUN dpkg-reconfigure libdvd-pkg RUN dpkg-reconfigure libdvd-pkg
RUN true \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
cowsay
COPY src/* /app/ COPY src/* /app/
COPY abcde.conf httpd.conf /etc/ COPY abcde.conf httpd.conf /etc/
COPY --chown=linuxserver:linuxserver www /www COPY --chown=linuxserver:linuxserver www /www

View File

@ -2,7 +2,7 @@
set -e set -e
tag=registry.gitlab.com/dartcatcher/media-sucker/media-sucker tag=git.woozle.org/neale/media-sucker
docker build --tag $tag . docker build --tag $tag .
case "$1" in case "$1" in

View File

@ -14,7 +14,7 @@ MINUTE = 60 * SECOND
HOUR = 60 * MINUTE HOUR = 60 * MINUTE
def scan(state, device): def scan(state, device):
# Get disc ID logging.info("Scanning CD to get disc ID")
p = subprocess.run( p = subprocess.run(
[ [
"cd-discid", "cd-discid",
@ -27,7 +27,7 @@ def scan(state, device):
state["discid"] = discid state["discid"] = discid
cddb_id = discid.split()[0] cddb_id = discid.split()[0]
# Look it up in cddb logging.info("Looking disc up on CDDB")
email = os.environ.get("EMAIL") # You should really set this variable, tho email = os.environ.get("EMAIL") # You should really set this variable, tho
if not email: if not email:
user = "user" user = "user"
@ -49,6 +49,8 @@ def scan(state, device):
state["title"] = "Unknown CD - %s" % cddb_id state["title"] = "Unknown CD - %s" % cddb_id
state["tracks"] = ["Track %02d" % (i+1) for i in range(num_tracks)] state["tracks"] = ["Track %02d" % (i+1) for i in range(num_tracks)]
logging.info("CD scan complete")
def copy(state, device, directory): def copy(state, device, directory):
# cdparanoia reports completion in samples # cdparanoia reports completion in samples
@ -59,7 +61,7 @@ def copy(state, device, directory):
track_num = 1 track_num = 1
for track_name in state["tracks"]: for track_name in state["tracks"]:
logging.debug("Ripping track %d of %d", track_num, len(state["tracks"])) logging.info("Ripping track %d of %d", track_num, len(state["tracks"]))
p = subprocess.Popen( p = subprocess.Popen(
[ [
"cdparanoia", "cdparanoia",
@ -99,7 +101,7 @@ def encode(state, directory):
tag_script.write("\n") tag_script.write("\n")
for track_name in state["tracks"]: for track_name in state["tracks"]:
logging.debug("Encoding track %d (%s)" % (track_num, track_name)) logging.info("Encoding track %d (%s)" % (track_num, track_name))
duration = durations[track_num-1] duration = durations[track_num-1]
argv = [ argv = [
"lame", "lame",

View File

@ -88,6 +88,8 @@ class Reader(worker.Worker):
time.sleep(i * 5) time.sleep(i * 5)
def handle(self, video): def handle(self, video):
logging.info("Handling media, video=%r" % video)
self.status["video"] = video self.status["video"] = video
self.status["state"] = "reading" self.status["state"] = "reading"

View File

@ -9,7 +9,7 @@ docker run \
-v /dev:/hdev \ -v /dev:/hdev \
-v /srv/ext/incoming/sucker:/incoming/sucker \ -v /srv/ext/incoming/sucker:/incoming/sucker \
--cpu-shares 256 \ --cpu-shares 256 \
registry.gitlab.com/dartcatcher/media-sucker/media-sucker \ git.woozle.org/neale/media-sucker \
-incoming /incoming/sucker \ -incoming /incoming/sucker \
-drive /hdev/sr0 /hdev/sr1 /hdev/sr2 -drive /hdev/sr0 /hdev/sr1 /hdev/sr2

View File

@ -4,6 +4,7 @@
<title>Media Sucker</title> <title>Media Sucker</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
<link rel="icon" href="cd-dvd.svg">
<script src="sucker.mjs" type="module"></script> <script src="sucker.mjs" type="module"></script>
</head> </head>
<body> <body>