feat: no-nginx frontend, host nginx config, configurable ports
- Frontend: remove nginx, use serve for static files - Frontend: add Projects/Milestones/Notifications pages - Frontend: fix auth endpoint to match backend (/auth/token) - docker-compose: configurable ports via env vars, reduce frontend resources - Add nginx-host.conf.example for host-level reverse proxy - Add .env.example - Update README with deployment architecture
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
@@ -10,16 +11,11 @@ services:
|
||||
MYSQL_USER: ${MYSQL_USER:-harborforge}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-harborforge_pass}
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
- mysql_data:/var/lib/mysql
|
||||
ports:
|
||||
- 3306:3306
|
||||
- "${MYSQL_PORT:-3306}:3306"
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- mysqladmin
|
||||
- ping
|
||||
- -h
|
||||
- localhost
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -28,6 +24,7 @@ services:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./HarborForge.Backend
|
||||
@@ -39,53 +36,46 @@ services:
|
||||
SECRET_KEY: ${SECRET_KEY:-change_me_in_production}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
ports:
|
||||
- 8000:8000
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./HarborForge.Backend:/app
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- curl
|
||||
- -f
|
||||
- http://localhost:8000/health
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./HarborForge.Frontend
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_API_BASE: ${VITE_API_BASE:-/api}
|
||||
container_name: harborforge-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000:3000
|
||||
- "${FRONTEND_PORT:-3000}:3000"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
cpus: '0.25'
|
||||
memory: 128M
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- -q
|
||||
- --spider
|
||||
- http://localhost:3000
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user