- Move all frontend code to frontend/ directory - Add backend/ with Go project structure (cmd, internal, pkg) - Add docker-compose.yml for orchestration
29 lines
574 B
YAML
29 lines
574 B
YAML
services:
|
|
# Development service with hot reload
|
|
frontend-dev:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ./frontend:/app
|
|
- node_modules:/app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
environment:
|
|
- NODE_ENV=development
|
|
command: sh -c "yarn install && yarn dev --host"
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
# Production frontend service
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: production
|
|
ports:
|
|
- "8080:80"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
node_modules:
|