Deploy LittleShop to Hostinger with Docker and BunkerWeb
- Updated Docker configuration for production deployment - Added SilverPay integration settings - Configured for admin.thebankofdebbie.giize.com deployment - Includes all recent security fixes and improvements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,10 +1,12 @@
|
||||
# Use the official ASP.NET Core runtime image (optimized)
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-jammy-chiseled AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
EXPOSE 5000
|
||||
|
||||
# Create non-root user for security
|
||||
USER $APP_UID
|
||||
# Install curl for health checks
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use the SDK image for building
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-jammy AS build
|
||||
@@ -70,12 +72,14 @@ USER $APP_UID
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -f http://localhost:8080/health || exit 1
|
||||
CMD curl -f http://localhost:5000/api/catalog/products || exit 1
|
||||
|
||||
# Optimize runtime
|
||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 \
|
||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0 \
|
||||
DOTNET_RUNNING_IN_CONTAINER=true \
|
||||
DOTNET_USE_POLLING_FILE_WATCHER=true \
|
||||
ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
||||
ASPNETCORE_FORWARDEDHEADERS_ENABLED=true \
|
||||
ASPNETCORE_URLS=http://+:5000 \
|
||||
ASPNETCORE_ENVIRONMENT=Production
|
||||
|
||||
ENTRYPOINT ["dotnet", "LittleShop.dll"]
|
||||
Reference in New Issue
Block a user