Repository navigation
Fix Dockerfile with multi-stage build and frontend support - #36
Merged
Merged
Conversation
…-root user The previous Dockerfile was broken: only 7 of 34+ .csproj files were copied (restore failed), no Node.js for React/Vite frontend builds, and missing global.json/Tailwind CLI. This rewrites all three Docker files: Dockerfile: - 4-stage build: base (SDK+Node.js) → restore → build → runtime - All framework, module, and ServiceDefaults .csproj files in restore layer - Node.js 22 LTS for Vite/React frontend builds - Tailwind CSS CLI download for Linux (x64/arm64) - npm ci + npm run build for all frontend workspaces - Non-root appuser in runtime image - ErrorOnDuplicatePublishOutputFiles for module package.json conflicts docker-compose.yml: - Health check on API service (/health/live) - PostgreSQL 16 → 17 - Environment variable for passwords (POSTGRES_PASSWORD) - Added Database__Provider=PostgreSQL - Development environment for auto-migration - restart: unless-stopped on both services .dockerignore: - Exclude node_modules, bin/obj, tests, docs, cli, AppHost - Prevent huge Docker context transfers
Deploying simplemodule-website with
|
| Latest commit: |
a953a5f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e4a4f3c5.simplemodule-website.pages.dev |
| Branch Preview URL: | https://feature-recursing-clarke.simplemodule-website.pages.dev |
1 task done
antosubash
added a commit
that referenced
this pull request
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Database__Provider=PostgreSQL, andrestart: unless-stoppednode_modules/,bin/obj/, tests, docs, CLI, and AppHost — preventing huge Docker context transfersTest plan
docker compose buildsucceeds (verified)docker compose upstarts both services, API connects to PostgreSQL (verified)curl http://localhost:8080/health/livereturns 200 after migrations completehttp://localhost:8080serves React app with CSS