Compare commits
No commits in common. "cfbe6aff48ccef94a68fb6fb0409ab682c4f888c" and "7e6868fd3792914c0bcf779de33fcdec1310bde1" have entirely different histories.
cfbe6aff48
...
7e6868fd37
|
@ -1,3 +0,0 @@
|
|||
[submodule "docker-files/mega/flac2opus"]
|
||||
path = docker-files/mega/flac2opus
|
||||
url = https://github.com/oct2pus/flac2opus
|
|
@ -1,36 +1,10 @@
|
|||
FROM debian:stable-slim
|
||||
RUN dpkg --add-architecture armhf
|
||||
RUN apt-get update
|
||||
# get neccessary files
|
||||
RUN apt-get -y install wget golang-go fish opus-tools dbus
|
||||
RUN dbus-uuidgen > /etc/machine-id
|
||||
RUN ["/bin/apt-get", "update"]
|
||||
RUN apt-get -y install wget
|
||||
RUN wget http://http.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_armhf.deb && apt-get -y install "$PWD/libssl1.1_1.1.1w-0+deb11u1_armhf.deb"
|
||||
RUN wget https://mega.nz/linux/repo/Raspbian_11/armhf/megacmd-Raspbian_11_armhf.deb && apt-get -y install "$PWD/megacmd-Raspbian_11_armhf.deb"
|
||||
# golf
|
||||
RUN mkdir -p /root/golf
|
||||
WORKDIR /root/golf
|
||||
ADD flac2opus/golf/main.go main.go
|
||||
ADD flac2opus/golf/go.mod go.mod
|
||||
RUN go mod tidy
|
||||
RUN go build .
|
||||
RUN cp golf /usr/bin/golf
|
||||
# gold
|
||||
RUN mkdir -p /root/gold
|
||||
WORKDIR /root/gold
|
||||
ADD flac2opus/gold/main.go main.go
|
||||
ADD flac2opus/gold/go.mod go.mod
|
||||
RUN go mod tidy
|
||||
RUN go build .
|
||||
RUN cp gold /usr/bin/gold
|
||||
# sync files
|
||||
WORKDIR /
|
||||
RUN mkdir -p /root/.megaCmd
|
||||
RUN mkdir /root/.megaCmd
|
||||
ADD .megaCmd/* /root/.megaCmd
|
||||
RUN mkdir -p /root/sync/music
|
||||
RUN mkdir -p /root/sync/music-opus
|
||||
COPY flac2opus/convert.fish /root/convert.fish
|
||||
RUN mega-sync /root/sync/music Music/
|
||||
RUN mega-sync /root/sync/music-opus Music-opus/
|
||||
RUN chmod +x /root/convert.fish
|
||||
WORKDIR /root/
|
||||
WORKDIR /root
|
||||
CMD mega-cmd-server
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 1041495f6a371fad2aaee33abb962a5a3c4c0d13
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description="runs a .flac to .opus conversion script in mega container"
|
||||
Wants=convert.timer
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/podman exec -i -d mega ./convert.fish sync/music sync/music-opus
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Run convert.service 30 minutes after boot and daily.
|
||||
|
||||
[Timer]
|
||||
OnBootSec=30m
|
||||
OnUnitActiveSec=1d
|
||||
Persistent=true
|
||||
Unit=convert.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -1,20 +0,0 @@
|
|||
[Unit]
|
||||
Description=mega.service
|
||||
Wants=network-online.target
|
||||
After=NetworkManager.service network.target network-online.target
|
||||
RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
|
||||
|
||||
# %E is "the XDG_CONFIG path"
|
||||
|
||||
[Service]
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
Restart=on-failure
|
||||
TimeoutStopSec=70
|
||||
ExecStart=/usr/bin/podman run -d --name=mega -v mega-data:/root/sync localhost/mega
|
||||
ExecStop=/usr/bin/podman stop mega
|
||||
ExecStopPost=/usr/bin/podman rm mega
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Reference in New Issue