Add nginx reverse proxy and environment configuration

- Add nginx.conf for proxying API requests to backend
- Update frontend Dockerfile for production build with nginx
- Move hardcoded values to .env variables in docker-compose.yml
- Add .env.example template for configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-12 11:02:33 +03:00
parent 266f3768ef
commit 333de65fbd
4 changed files with 175 additions and 22 deletions

View File

@@ -1,18 +1,18 @@
FROM node:20-slim
# Build stage
FROM node:20-slim AS build
WORKDIR /app
# Copy package files
COPY package.json .
# Install dependencies
COPY package.json package-lock.json* ./
RUN npm install
# Copy source files
COPY . .
RUN npm run build
# Expose port
EXPOSE 5173
# Production stage - just serve static files
FROM nginx:alpine
# Run dev server
CMD ["npm", "run", "dev"]
# Copy built frontend
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80