Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerized Deployment V2 #403

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:3.12-slim-bookworm

# Install required packages
RUN apt-get update --allow-releaseinfo-change
RUN apt-get install figlet ffmpeg wireless-tools -y

# Copy contents of the project into the image
RUN mkdir pikaraoke
COPY pikaraoke pikaraoke/pikaraoke
COPY pyproject.toml pikaraoke
COPY scripts/entrypoint.sh pikaraoke/

# Install Poetry
RUN pip install poetry

# Install dependencies
RUN cd pikaraoke && poetry install

# Make entrypoint script executable
RUN chmod +x pikaraoke/entrypoint.sh

# Set Entrypoint
ENTRYPOINT ["pikaraoke/entrypoint.sh"]
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
pikaraoke:
image: pikaraoke:latest
container_name: PiKaraoke
network_mode: host
environment:
EXTRA_ARGS: --high-quality # Optional
volumes:
- /path/to/song/storage:/pikaraoke-songs # Optional
restart: unless-stopped
10 changes: 10 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

figlet PiKaraoke

# Run pikaraoke with necessary parameters
cd pikaraoke
poetry run pikaraoke -d /pikaraoke-songs/ --headless $EXTRA_ARGS

# Keep the container running
tail -f /dev/null