Skip to content

Latest commit

 

History

History
83 lines (64 loc) · 1.64 KB

BUILD.md

File metadata and controls

83 lines (64 loc) · 1.64 KB

Media Downloads Organizer

Docker

First start

git clone [email protected]:antlafarge/media-downloads-organizer.git
cd ./media-downloads-organizer/
docker build -t media-downloads-organizer .
docker run -d -v "/mnt/hdd/Downloads:/usr/src/app/downloads" -v "/mnt/hdd/Movies:/usr/src/app/movies" --env OutputMoviePattern="<Title> (<Year>) <Quality>.<Extension>" --env OutputSeriePattern="<Title> S<SeasonNumber>E<EpisodeNumber> <EpisodeTitle> (<Year>) <Quality>.<Extension>" --name mdo media-downloads-organizer

Next starts

Manually

docker start mdo

Crontab

crontab -e

Add this line :

0 0,12 * * * docker start mdo

Check logs

docker logs --follow mdo

Update

  • Update code :
cd ./media-downloads-organizer/
git pull
docker rm -f mdo
  • Re-do these steps from 'First start'
    • Docker build
    • Docker run
  • Remove old unsued images :
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Remove / clean

docker rm -f mdo
docker rmi media-downloads-organizer $(docker images --filter "dangling=true" -q --no-trunc) node
rm -R ./media-downloads-organizer/

Node.js commands reminder

npm isntall -g npm
# npm init -y
# npm install --save node-fetch jsdom
npm install --save
node src/main.js # Or F5 to start debugging

Build

docker buildx ls
docker buildx rm mybuilder
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
docker buildx build --platform linux/arm64/v8 -t antlafarge/media-downloads-organizer:latest -f Dockerfile --push .