feat: add Docker Compose deployment for backend/frontend/postgres

Backend Dockerfile runs drizzle-kit migrate on start, frontend serves the
built Vite app via nginx and proxies /api to the backend container.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TBf3yfnnHzMQ5qhLV2285A
This commit is contained in:
patrickandClaude Sonnet 5 committed 2026-09-11 15:28:01 +02:00
1 parent b38a5a4a57
commit b5ac041c32
8 files changed
+123

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
node_modules
dist
.env
.env.local
+11
View File
@@ -0,0 +1,11 @@
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
+18
View File
@@ -0,0 +1,18 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://backend:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
try_files $uri /index.html;
}
}