Initial commit — AsadiTools v1.0
Full ASP.NET Core 10 Razor Pages app for آساد ابزار tool repair shop in Karaj, Iran (official DeWalt representative). Features: - Homepage, Services, DeWalt page, Shop (pagination + images) - 10 brand SEO pages (/brands/*) with rich Persian content + FAQ schema - Blog engine with admin management (/blog, /Admin/Blog) - Cart, Checkout, Contact (OpenStreetMap embed) - Admin panel: Products CRUD, Orders, Blog, Change Password - Jalali date formatting, product images, SiteData centralised contact - Docker + docker-compose with healthcheck - Gitea CI/CD via .gitea/workflows/ci-cd.yml (NuGet through Nexus mirror) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
# ── Stage 1: Build ──────────────────────────────────────────────────────────
|
||||
ARG DOTNET_SDK_IMAGE=mcr.microsoft.com/dotnet/sdk:10.0
|
||||
FROM ${DOTNET_SDK_IMAGE} AS build
|
||||
WORKDIR /src
|
||||
|
||||
# NuGet through Nexus mirror
|
||||
COPY nuget.docker.config /tmp/nuget.config
|
||||
|
||||
# Restore (layer-cached unless .csproj changes)
|
||||
COPY AsadiTools.csproj .
|
||||
RUN dotnet restore --configfile /tmp/nuget.config
|
||||
|
||||
# Copy everything else and publish
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -o /app/publish --no-restore
|
||||
|
||||
# ── Stage 2: Runtime ─────────────────────────────────────────────────────────
|
||||
ARG DOTNET_RUNTIME_IMAGE=mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
FROM ${DOTNET_RUNTIME_IMAGE} AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
# Create data directory for SQLite volume mount
|
||||
RUN mkdir -p /app/data && chmod 777 /app/data
|
||||
|
||||
# Copy published output
|
||||
COPY --from=build /app/publish .
|
||||
|
||||
# Override connection string to use /app/data/asadi.db (volume path)
|
||||
ENV ConnectionStrings__Default="Data Source=/app/data/asadi.db"
|
||||
ENV ASPNETCORE_URLS="http://+:8080"
|
||||
ENV ASPNETCORE_ENVIRONMENT="Production"
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["dotnet", "AsadiTools.dll"]
|
||||
Reference in New Issue
Block a user