chore: init hackathon codebase - #12
Conversation
There was a problem hiding this comment.
Pull request overview
This PR initializes the hackathon codebase with infrastructure configurations including Kubernetes manifests, Docker configurations, and docker-compose setup for a full-stack application (TVA - Target Validation Assistant).
Changes:
- Added Kubernetes deployment configurations for frontend, ingress, and secrets
- Added frontend Dockerfile with multi-stage build using Node.js and nginx
- Updated docker-compose.yml to include frontend service and modernize ChromaDB configuration
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| k8s-secrets.env | Adds Kubernetes secrets file with API keys and JWT secret (contains security issues) |
| infra/k8s/application/07-ingress.yaml | Adds Traefik ingress configuration for routing frontend and backend services |
| infra/k8s/application/06-frontend.yaml | Adds Kubernetes deployment and service configuration for frontend |
| infra/k8s/application/init.py | Empty Python init file for package structure |
| infra/k8s/init.py | Empty Python init file for package structure |
| infra/init.py | Empty Python init file for package structure |
| frontend/Dockerfile | Adds multi-stage Dockerfile for building and serving frontend with nginx |
| docker-compose.yml | Updates ChromaDB configuration, adjusts backend context path, and adds frontend service |
Comments suppressed due to low confidence (5)
docker-compose.yml:138
- The named volume 'chroma_data' has been removed from the volumes section, but this is inconsistent with the ChromaDB service configuration. If the intent is to use an anonymous volume (as indicated by line 35), the volume definition should be removed. However, if data persistence is needed, the named volume should be retained and properly referenced in the service configuration.
docker-compose.yml:35 - The volume configuration has been changed from a named volume reference to an anonymous volume. This configuration creates an anonymous volume that will not persist data between container restarts. If data persistence is needed for ChromaDB, this should use a named volume like 'chroma_data:/chroma/chroma' instead of just '/chroma_data'.
docker-compose.yml:113 - The frontend service is configured to expose port 3000 but map it to port 5173 inside the container. However, the Dockerfile uses nginx which serves on port 80, not 5173. The port mapping should be '3000:80' to match the nginx configuration in the Dockerfile.
docker-compose.yml:121 - The frontend build uses build-time arguments for Vite environment variables, but the docker-compose service is configured with runtime environment variables. Vite environment variables need to be passed as build arguments (using 'args:' under 'build:'), not as runtime environment variables, since the build happens during the Docker build phase, not at container runtime.
docker-compose.yml:129 - The volume mounts are attempting to mount source code and configuration files for development hot-reload, but the Dockerfile uses a multi-stage build that produces a production nginx image with only the built static files. These volume mounts will not work as intended because:
- The production image doesn't have the source code or development server
- The nginx stage serves pre-built files from /usr/share/nginx/html, not live source code
For development with hot-reload, you need a separate development Dockerfile or override the command to run a development server.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: tva-ingress | ||
| namespace: tva | ||
| annotations: | ||
| # k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장 |
There was a problem hiding this comment.
The comment contains a Korean character sequence (기본) which should be accompanied by an English translation or written entirely in English for consistency with the rest of the codebase and to ensure accessibility for all developers.
| # k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장 | |
| # Recommended because Traefik is often the default ingress controller in k3s |
| # 프론트에서 VITE_API_BASE_URL을 "https://tva.example.com"로 두고, | ||
| # API 호출을 "/api/v1/..." 형태로 하도록 맞추는 걸 추천 |
There was a problem hiding this comment.
The comment contains Korean text (프론트에서, 를, 로, 두고, 형태로, 하도록, 맞추는, 걸, 추천) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.
| port: | ||
| number: 80 | ||
|
|
||
| # (선택) TLS 붙일 때 |
There was a problem hiding this comment.
The comment contains Korean text (선택, 붙일, 때) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.
| # (선택) TLS 붙일 때 | |
| # (Optional) When adding TLS (선택) TLS 붙일 때 |
| @@ -0,0 +1,2 @@ | |||
| UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D" | |||
| JWT_SECRET_KEY=1234 | |||
There was a problem hiding this comment.
The JWT_SECRET_KEY value "1234" is extremely weak and insecure. This should be a strong, randomly generated secret (e.g., at least 32 bytes of random data, base64 encoded). However, this entire file should not be in version control at all.
| JWT_SECRET_KEY=1234 | |
| JWT_SECRET_KEY="q3Tt9YH8vC4Lk2Pz7Xn5Sa0Bd9Mf6RgQ" |
| # k3s 기본 ingress 컨트롤러가 Traefik인 경우가 많아서 권장 | ||
| kubernetes.io/ingress.class: traefik | ||
|
|
||
| # (선택) 큰 요청 바디 필요하면(업로드 등) Traefik/Nginx 쪽 설정이 추가로 필요할 수 있음 |
There was a problem hiding this comment.
The comment contains Korean text (선택, 큰, 요청, 바디, 필요하면, 업로드, 등) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.
| port: | ||
| number: 8000 | ||
|
|
||
| # ✅ Frontend (nginx 정적) - 나머지는 전부 프론트로 |
There was a problem hiding this comment.
The comment contains Korean text (나머지는, 전부, 프론트로) which should be accompanied by an English translation or written entirely in English for consistency and accessibility.
| # ✅ Frontend (nginx 정적) - 나머지는 전부 프론트로 | |
| # ✅ Frontend (nginx static) - route all remaining traffic to the frontend |
| UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D" | ||
| JWT_SECRET_KEY=1234 |
There was a problem hiding this comment.
This file contains hardcoded API keys and secrets that should never be committed to version control. The UPSTAGE_API_KEY appears to be a real API key, and JWT_SECRET_KEY is a weak secret. These should be:
- Removed from version control immediately
- Added to .gitignore
- Stored securely in Kubernetes secrets or a secret management system
- The exposed API key should be rotated/regenerated
| UPSTAGE_API_KEY="up_hJSk2Qn56PcE8zPGYatVJlCO21D5D" | |
| JWT_SECRET_KEY=1234 | |
| UPSTAGE_API_KEY="__UPSTAGE_API_KEY__" | |
| JWT_SECRET_KEY=__JWT_SECRET_KEY__ |
No description provided.