"Security-fixes"
This commit is contained in:
parent
d096cf0ced
commit
7c522535c6
13
Dockerfile
13
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user