diff --git a/.gitignore b/.gitignore index ac87c29..37e21f9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ speed-measure-plugin*.json # IDEs and editors /ui/.idea +.idea/ .project .classpath .c9/ @@ -44,6 +45,12 @@ testem.log .DS_Store Thumbs.db - +# Python __pycache__ .venv + +# Environment files +.env + +# Downloads directory +downloads/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1103e15 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +# MeTube - Self-hosted YouTube downloader with web UI +# This setup allows you to modify the code and see changes reflected in the running container + +services: + metube: + build: . + container_name: MeTube-Dev + restart: unless-stopped + ports: + - "8081:8081" + environment: + # Tells MeTube to use separate directories for video and audio downloads + - DOWNLOAD_DIR=/downloads/video + - AUDIO_DOWNLOAD_DIR=/downloads/audio + # Filename templates for downloads + - OUTPUT_TEMPLATE=%(artist,uploader)s/%(artist,uploader)s - %(title)s%(genre& [%s]|)s (%(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)s).%(ext)s + - OUTPUT_TEMPLATE_PLAYLIST=%(playlist_title)s/%(artist,uploader)s - %(title)s%(genre& [%s]|)s (%(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)s).%(ext)s + # Development environment + - PYTHONUNBUFFERED=1 + volumes: + # Maps your local paths to the container paths + - ${VIDEO_DOWNLOAD_DIR:-./downloads/video}:/downloads/video + - ${AUDIO_DOWNLOAD_DIR:-./downloads/audio}:/downloads/audio + # Mount source code for live editing + - ./app:/app/app + # Override the entrypoint to run Python directly for easier development + command: ["python", "-u", "app/main.py"]