From 7c522535c61788ad775f2d9d203569036417ecea Mon Sep 17 00:00:00 2001 From: sysadmin Date: Mon, 29 Sep 2025 06:37:15 +0100 Subject: [PATCH] "Security-fixes" --- Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dee8cb6..22fdc5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,13 +52,13 @@ RUN dotnet publish "LittleShop.csproj" \ FROM base AS final WORKDIR /app -# Create necessary directories with proper permissions (run as root temporarily) +# Create necessary directories with proper permissions RUN mkdir -p /app/wwwroot/uploads/products \ && mkdir -p /app/data \ && mkdir -p /app/logs \ - && chmod -R 755 /app/wwwroot \ - && chmod -R 755 /app/data \ - && chmod -R 755 /app/logs + && chmod -R 777 /app/wwwroot \ + && chmod -R 777 /app/data \ + && chmod -R 777 /app/logs # Copy published app COPY --from=publish /app/publish . @@ -74,9 +74,10 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0 \ ASPNETCORE_FORWARDEDHEADERS_ENABLED=true \ ASPNETCORE_URLS=http://+:8080 \ ASPNETCORE_ENVIRONMENT=Production \ - ConnectionStrings__DefaultConnection="Data Source=/app/data/littleshop-prod.db" \ + ConnectionStrings__DefaultConnection="Data Source=/app/data/littleshop-prod.db;Cache=Shared" \ SilverPay__BaseUrl="http://31.97.57.205:8001" \ - SilverPay__ApiKey="your-api-key-here" + SilverPay__ApiKey="your-api-key-here" \ + TMPDIR=/tmp # Start as root to ensure permissions (can be improved later) USER root