T-2: add multi-stage Dockerfile and SPA-serving Spring Boot config
Replace server.servlet.context-path=/api with addPathPrefix so API endpoints stay under /api while static resources and SPA routes are served at /. Spring Boot falls back to index.html for unknown paths (SPA forwarding). Multi-stage Dockerfile builds frontend (Node 24) and backend (Temurin 25) into a single 250MB JRE-alpine image with Docker-native HEALTHCHECK. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,11 +26,11 @@
|
||||
**Description:** Create a multi-stage Dockerfile that builds backend and frontend and produces a single runnable container. This task focuses exclusively on the Docker build — database wiring, environment variable configuration, and docker-compose documentation are deferred to T-4 (where JPA and migration tooling are introduced).
|
||||
|
||||
**Acceptance Criteria:**
|
||||
- [ ] Single multi-stage Dockerfile at repo root that builds backend and frontend and produces one container
|
||||
- [ ] `.dockerignore` excludes build artifacts, IDE files, and unnecessary files from the build context
|
||||
- [x] Single multi-stage Dockerfile at repo root that builds backend and frontend and produces one container
|
||||
- [x] `.dockerignore` excludes build artifacts, IDE files, and unnecessary files from the build context
|
||||
- [x] Health-check endpoint so Docker/orchestrators can verify the app is alive
|
||||
- [ ] `docker build .` succeeds and produces a working image
|
||||
- [ ] Container starts and the health-check endpoint responds
|
||||
- [x] `docker build .` succeeds and produces a working image
|
||||
- [x] Container starts and the health-check endpoint responds
|
||||
|
||||
**Dependencies:** T-1, T-5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user