first pass

This commit is contained in:
2026-01-26 22:33:55 -06:00
commit fe66be4aad
37 changed files with 3127 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
bin
obj
.git
.gitignore
.env
.env.local
*.tar
*.tar.gz
# IDE
.vs
.vscode
.idea
*.user
*.suo
# Build
publish
# Documentation
README.md
README.DOCKER.md
docs
# Docker files
Dockerfile
docker-compose.yml
.dockerignore
docker-deployment.json
*.ps1
# Logs
*.log
logs

View File

@@ -0,0 +1,28 @@
# Stage 1: Build
FROM mcr.microsoft.com/dotnet/sdk:{{DOTNET_VERSION}} AS build
WORKDIR /src
# Copy project file and restore
COPY ["{{CSPROJ_FILE}}", "./"]
RUN dotnet restore "{{CSPROJ_FILE}}"
# Copy everything else and build
COPY . .
RUN dotnet build "{{CSPROJ_FILE}}" -c Release -o /app/build
RUN dotnet publish "{{CSPROJ_FILE}}" -c Release -o /app/publish
# Stage 2: Runtime
FROM mcr.microsoft.com/dotnet/aspnet:{{DOTNET_VERSION}}
WORKDIR /app
COPY --from=build /app/publish .
# Set environment
ENV ASPNETCORE_URLS=http://+:{{PORT}}
ENV ASPNETCORE_ENVIRONMENT=Production
EXPOSE {{PORT}}
ENTRYPOINT ["dotnet", "{{DLL_NAME}}"]

View File

@@ -0,0 +1,20 @@
services:
{{PROJECT_NAME}}:
build: .
container_name: {{PROJECT_NAME}}
restart: unless-stopped
ports:
- "${HOST_PORT:-{{PORT}}}:{{PORT}}"
{{#if USE_ENV_FILE}}
env_file:
- .env
{{/if}}
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:{{PORT}}
{{#if HAS_VOLUMES}}
volumes:
{{#each VOLUMES}}
- {{this}}
{{/each}}
{{/if}}