Deployment

Guidelines for deploying applications powered by an5 ORM across cloud providers and containerized environments.

Active Context: Deploying Dotnet application with Postgresql database.

Production Checklist

Before going live:

  • Set DATABASE_URL securely via cloud environment secrets manager.
  • Configure connection pooling limits appropriate for your container concurrency.
  • Enable TLS/SSL connection encryption (sslmode=require, encrypt=true).
  • Run automated health check before accepting traffic.
  • Verify automated database backup and disaster recovery schedules.

Environment Configuration

Production Connection String

Set DATABASE_URL according to your target cloud database provider:

# Production DATABASE_URL (Active: Postgresql)
DATABASE_URL=postgres://prod_user:StrongPassword@db-cluster.us-east-1.rds.amazonaws.com:5432/prod_db?sslmode=require

# Application environment
NODE_ENV=production
LOG_LEVEL=warn

Runtime Initialization

using an5Adapters.Dotnet;

var connStr = Environment.GetEnvironmentVariable("DATABASE_URL")
    ?? throw new InvalidOperationException("DATABASE_URL is not set");
var adapter = new An5Adapter(connStr);

Container Deployment (Docker)

Multi-stage Dockerfile tailored for your stack:


FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runner
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 8080
ENTRYPOINT ["dotnet", "App.dll"]


Next Steps