dev-env(proxmox): switch compose to direct-port exposure; document homelab topology
- docker-compose.dev.yml: drop Traefik/dev.resolutionflow.com labels, expose
backend:8000 and frontend:5173 directly; swap relative bind mounts for
${REPO_ROOT}/... so compose works when driven from inside a code-server
container with the host Docker socket mounted; default POSTGRES_PORT to
5433 host-side; add explicit uvicorn/npm run dev commands; add
ENABLE_MCP_MICROSOFT_LEARN and docker-01/Tailscale CORS origins.
- frontend/vite.config.ts: replace dev.resolutionflow.com with
allowedHosts=['docker-01', '.ts.net', 'localhost'] for direct-port access
over the private network.
- DEV-ENV.md: add Section 11 reference topology for the homelab Proxmox +
code-server Option B setup, plus troubleshooting entries for the
REPO_ROOT-empty-mount trap and the Vite allowedHosts rejection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
name: resolutionflow
|
||||
|
||||
services:
|
||||
db:
|
||||
image: pgvector/pgvector:pg16
|
||||
@@ -8,7 +9,7 @@ services:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: resolutionflow
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
- "${POSTGRES_PORT:-5433}:5432"
|
||||
volumes:
|
||||
- rf_postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
@@ -22,8 +23,11 @@ services:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: resolutionflow_backend
|
||||
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ${REPO_ROOT}/backend:/app
|
||||
environment:
|
||||
- APP_NAME=ResolutionFlow
|
||||
- DEBUG=true
|
||||
@@ -33,42 +37,34 @@ services:
|
||||
- ALGORITHM=HS256
|
||||
- ACCESS_TOKEN_EXPIRE_MINUTES=15
|
||||
- REFRESH_TOKEN_EXPIRE_DAYS=7
|
||||
- REQUIRE_INVITE_CODE=true
|
||||
- FEEDBACK_EMAIL=feedback@resolutionflow.com
|
||||
- AI_PROVIDER=anthropic
|
||||
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
||||
- GOOGLE_AI_API_KEY=${GOOGLE_AI_API_KEY}
|
||||
- CORS_ORIGINS=["http://localhost:3000","http://localhost:5173","http://127.0.0.1:3000","http://127.0.0.1:5173","http://46.202.92.250:5173","http://46.202.92.250:3000","https://resolutionflow.com","https://www.resolutionflow.com"]
|
||||
- GOOGLE_AI_API_KEY=${GOOGLE_AI_API_KEY:-}
|
||||
- ENABLE_MCP_MICROSOFT_LEARN=true
|
||||
- FRONTEND_URL=http://docker-01:5173
|
||||
- CORS_ORIGINS=["http://localhost:5173","http://127.0.0.1:5173","http://docker-01:5173","http://100.64.78.44:5173"]
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.rf-api.rule=Host(`dev.resolutionflow.com`) && PathPrefix(`/api`)"
|
||||
- "traefik.http.routers.rf-api.entrypoints=websecure"
|
||||
- "traefik.http.routers.rf-api.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.rf-api.loadbalancer.server.port=8000"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: resolutionflow_frontend
|
||||
command: npm run dev -- --host 0.0.0.0 --port 5173
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- ${REPO_ROOT}/frontend:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- VITE_API_URL=https://dev.resolutionflow.com/
|
||||
- VITE_API_URL=http://docker-01:8000
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
depends_on:
|
||||
- backend
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.rf-frontend.rule=Host(`dev.resolutionflow.com`)"
|
||||
- "traefik.http.routers.rf-frontend.middlewares=dev-auth"
|
||||
- "traefik.http.middlewares.dev-auth.basicauth.users=chihlasm:$$apr1$$dJXUAZ3Y$$SsJm.K8fOjCeNMe4B70Bi0"
|
||||
- "traefik.http.routers.rf-frontend.entrypoints=websecure"
|
||||
- "traefik.http.routers.rf-frontend.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.rf-frontend.loadbalancer.server.port=5173"
|
||||
|
||||
volumes:
|
||||
rf_postgres_data:
|
||||
|
||||
rf_postgres_data:
|
||||
Reference in New Issue
Block a user