mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 04:05:08 +03:00
🐬 Added Docker stuff (#138)
* Docker flow * (Commit so my commit is verified) --------- Co-authored-by: Xiliourt <admin@xiliourt.ovh>
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user