[Local] Dockerized local test stack + always-show OTP in Development
CI/CD / CI · dotnet build (push) Successful in 32s
CI/CD / Deploy · hamkadr (push) Successful in 57s

Add docker-compose.local.yml + Dockerfile.local (public MS images + Liara NuGet) to run the whole app with a throwaway Postgres in one command for local testing, plus LOCAL.md. OtpService now never calls Kavenegar in the Development environment and always returns the code so the login page shows it on screen — guarantees local logins work with no SMS. Production behavior unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 19:21:47 +03:30
parent 2170ba250c
commit 6f02b1a0e9
4 changed files with 134 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
# Local-test image — uses public Microsoft base images + the Liara NuGet mirror.
# (The production Dockerfile pulls everything through the Nexus mirror instead.)
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY nuget.docker.config /tmp/nuget.config
COPY src/ ./src/
RUN dotnet restore src/JobsMedical.Web/JobsMedical.Web.csproj --configfile /tmp/nuget.config -p:NuGetAudit=false
RUN dotnet publish src/JobsMedical.Web/JobsMedical.Web.csproj -c Release -o /out --no-restore \
/p:UseAppHost=false /p:NuGetAudit=false
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /out ./
EXPOSE 8080
ENV ASPNETCORE_URLS=http://+:8080 \
DOTNET_CLI_TELEMETRY_OPTOUT=1
ENTRYPOINT ["dotnet", "JobsMedical.Web.dll"]