mirror of
https://github.com/Dvorinka/PlexSync.git
synced 2026-06-03 20:12:57 +00:00
ggg
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
# Ignore VCS and local environments
|
||||||
|
.git
|
||||||
|
.venv
|
||||||
|
venv
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
|
||||||
|
# IDE/editor
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
build
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# Local scripts
|
||||||
|
start.bat
|
||||||
|
|
||||||
|
# Uploaded files (will be mounted as a volume at runtime)
|
||||||
|
uploads/*
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
# Prevents Python from buffering stdout/stderr
|
||||||
|
ENV PYTHONUNBUFFERED=1 \
|
||||||
|
PIP_NO_CACHE_DIR=1 \
|
||||||
|
PORT=5000 \
|
||||||
|
FLASK_DEBUG=0
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system deps if needed (kept minimal)
|
||||||
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Python dependencies first (better layer caching)
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy application source
|
||||||
|
COPY app.py ./
|
||||||
|
COPY plexsync.py ./
|
||||||
|
COPY templates ./templates
|
||||||
|
COPY static ./static
|
||||||
|
|
||||||
|
# Create uploads directory
|
||||||
|
RUN mkdir -p /app/uploads
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Default command to run the Flask app
|
||||||
|
CMD ["python", "app.py"]
|
||||||
@@ -928,4 +928,7 @@ def playlist_created():
|
|||||||
unified_playlist=len(playlists) == 1 and 'source' not in playlists[0])
|
unified_playlist=len(playlists) == 1 and 'source' not in playlists[0])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
# Allow configuring host/port via environment for Docker
|
||||||
|
port = int(os.getenv('PORT', '5000'))
|
||||||
|
debug = os.getenv('FLASK_DEBUG', '0') == '1'
|
||||||
|
app.run(host='0.0.0.0', port=port, debug=debug)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
plexsync:
|
||||||
|
build: .
|
||||||
|
container_name: plexsync
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
environment:
|
||||||
|
- PORT=5000
|
||||||
|
- FLASK_DEBUG=0
|
||||||
|
volumes:
|
||||||
|
- ./uploads:/app/uploads
|
||||||
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user