From b682321a53ef60c32437de82ff5ab7ba324ba355 Mon Sep 17 00:00:00 2001 From: Benjamin Sherriff Date: Sun, 3 Mar 2024 15:24:11 -0500 Subject: [PATCH] Fixing docker build issues --- .gitignore | 16 +++++++++++----- service/.env.TEMPLATE | 6 +++--- service/Dockerfile | 6 ++---- service/docker-compose.yml | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 96397dc..32209be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,15 @@ -.env -target/ -.idea/ +# Common keys/ -**/Cargo.lock -.DS_Store +.env +# Service +target/ +**/Cargo.lock + +# UI .next/ node_modules/ + +# IDE +.idea/ +.DS_Store diff --git a/service/.env.TEMPLATE b/service/.env.TEMPLATE index 5e229dc..580a9eb 100644 --- a/service/.env.TEMPLATE +++ b/service/.env.TEMPLATE @@ -9,15 +9,15 @@ DATABASE_PORT=5432 KEYS_DIR_PATH= SESSION_TTL=1440 -REDIS_HOST=localhost -REDIS_PORT=6379 - MINIO_ROOT_USER=siren MINIO_ROOT_PASSWORD= MINIO_HOST=localhost MINIO_PORT=9000 MINIO_PORT_INTERNAL=9001 +REDIS_HOST=localhost +REDIS_PORT=6379 + SERVICE_HOST=localhost SERVICE_PORT=5000 DATA_DIR_PATH= diff --git a/service/Dockerfile b/service/Dockerfile index 3d9cb8e..9bff409 100644 --- a/service/Dockerfile +++ b/service/Dockerfile @@ -32,12 +32,10 @@ WORKDIR /packages ARG TARGETPLATFORM RUN apt-get update && apt-get install -y curl tar xz-utils && \ - if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - echo "Unsupported platform: amd64" && false; \ - elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \ + if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \ curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux_armv7l > yt-dlp && \ chmod +x yt-dlp; \ - elif [ "$TARGETPLATFORM" = "linux/aarch64" ]; then \ + elif [ "$TARGETPLATFORM" = "linux/aarch64" ] | [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux_aarch64 > yt-dlp && \ chmod +x yt-dlp; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ diff --git a/service/docker-compose.yml b/service/docker-compose.yml index 0350a42..d0c1016 100644 --- a/service/docker-compose.yml +++ b/service/docker-compose.yml @@ -26,7 +26,7 @@ services: DATA_DIR_PATH: /data KEYS_DIR_PATH: /keys volumes: - - ${DATA_DIR_PATH}:/data + - ${DATA_DIR_PATH:-~/data}:/data ports: - ${SERVICE_PORT:-5000}:5000 depends_on: