🐬 Added Docker stuff (#138)

* Docker flow

* (Commit so my commit is verified)

---------

Co-authored-by: Xiliourt <admin@xiliourt.ovh>
This commit is contained in:
xiliourt
2025-07-19 05:32:51 +10:00
committed by GitHub
parent e91bf6e655
commit 9a8c9d8d2d
3 changed files with 70 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
name: Push Docker Image to ghcr.io
# Run when release is published
on:
release:
types: [published]
workflow_dispatch: # Allow for manual push so I can test it
jobs:
build:
runs-on: ubuntu-latest
# Minimum required permissions
permissions:
contents: read
packages: write
steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v3
# Login to ghcr (automatically uses workflow actor and secret)
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Pushes to both :latest and :<versionTag>
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/tiddl:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository_owner }}/tiddl:latest
+6
View File
@@ -0,0 +1,6 @@
FROM python:alpine
WORKDIR /root
COPY . .
RUN --mount=type=cache,target=/root/.cache/pip pip install .
RUN rm -rf *
RUN apk add ffmpeg
+25
View File
@@ -45,6 +45,31 @@ Commands:
search Search on Tidal.
url Get Tidal URL.
```
## Dockerised Version (no Python required)
Based on python:alpine, slim build
**Docker run example (quickest / easiest)**
```
docker run -rm -v /downloads/dir:/root/Music/Tiddl/ -v ./config/tiddl/:/root/ >
```
**docker-compose.yml example (not required, though allows for advanced configs)**
```
services:
tiddl:
container_name: tiddl
image: <ghcr.ioURL>:latest
volumes:
- /downloads/dir:/root/Music/Tiddl/ #default dir
- ./config/tiddl/:/root/ # Default location of config file
command: tail -f /dev/null # Keep it running in background
```
**Access the container:**
```
docker exec -it tiddl sh
```
_all other instructions match python version_
# Basic usage