diff --git a/docker-compose.ui-dev.yml b/docker-compose.ui-dev.yml index ed4ee7aa..404393de 100644 --- a/docker-compose.ui-dev.yml +++ b/docker-compose.ui-dev.yml @@ -14,6 +14,8 @@ services: args: SNAPCASTVERSION: 0.26.0 container_name: hydraplay + environment: + PYTHONUNBUFFERED: 0 ports: - 8080:8080 - 1780:1780 @@ -24,4 +26,5 @@ services: # mount src folder for development - ./src/:/app/ - ./hydra.private.json:/tmp/hydra.config.json - - ./pipes/:/tmp/additional_streams \ No newline at end of file + - ./pipes/:/tmp/additional_streams + entrypoint: ["python3", "-u", "/app/hydraplay.sh", "--config", "/tmp/hydra.config.json", "--loglevel", "debug"] \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 73a2d04e..a4df7df6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,7 +16,7 @@ COPY src/ui /ui RUN ng build -FROM debian:buster-slim as hydraplay +FROM debian:bullseye-slim as hydraplay #======================================= MOPIDY INSTALLATION ===================================================# RUN apt-get update && \ @@ -28,7 +28,7 @@ RUN apt-get update && \ ca-certificates \ python3 \ python3-pip \ - python3-crypto \ + python3-cryptography \ python3-setuptools \ python3-pykka \ python3-gst-1.0 \ diff --git a/docker/Dockerfile.ui.dev b/docker/Dockerfile.ui.dev index 252f8af5..b2587a2f 100644 --- a/docker/Dockerfile.ui.dev +++ b/docker/Dockerfile.ui.dev @@ -1,4 +1,4 @@ -FROM debian:buster-slim as hydraplay +FROM debian:bullseye-slim as hydraplay #======================================= MOPIDY INSTALLATION ===================================================# RUN apt-get update && \ @@ -10,7 +10,7 @@ RUN apt-get update && \ ca-certificates \ python3 \ python3-pip \ - python3-crypto \ + python3-cryptography \ python3-setuptools \ python3-pykka \ python3-gst-1.0 \ @@ -54,6 +54,8 @@ RUN export SNAPCAST_ARCH=$TARGETARCH \ && mkdir -p /app \ && mkdir -p /temp/additional_streams \ && mkdir -p /root/.config/snapcast/ \ + && mkdir -p /var/log/hydraplay/ \ + && touch /var/log/hydraplay/hydraplay.log \ && touch /tmp/hydra.config.json \ && chmod 664 /tmp/hydra.config.json \ && chmod a+x /app/hydraplay.sh \ diff --git a/src/hydraplay/main.py b/src/hydraplay/main.py index 93dda2b6..3057e05f 100644 --- a/src/hydraplay/main.py +++ b/src/hydraplay/main.py @@ -67,12 +67,11 @@ def main(): parser.add_argument("--port", action="store", type=int, dest="port", help="Specify the port on which to bind the server") - parser.add_argument("-c", "--config", action="store", required=False, dest="config", + parser.add_argument("--config", action="store", required=False, dest="config", default="/etc/hydraplay/hydra.config.json", help="Specify the config file to use. HydraPlay needs to have write access for the config dialog to work. Defaults to /etc/hydraplay/hydra.config.json") - parser.add_argument("--logfile", action="store", dest="logConf", - default="/var/log/hydraplay/hydraplay.log", + parser.add_argument("--logfile", action="store", dest="logConf", default=None, help="Define the log file and path for logging. Defaults to /var/log/hydraplay/hydraplay.log") parser.add_argument("--loglevel", action="store", dest="logLevel", default="debug",