Fix Docker Compose: add PYTHONPATH for Alembic, use port 8100, fix Vite proxy for container networking

This commit is contained in:
root
2026-03-30 23:06:52 -05:00
parent 90945932ad
commit 3303cd1507
2 changed files with 5 additions and 3 deletions

View File

@@ -18,15 +18,17 @@ services:
backend: backend:
build: ./backend build: ./backend
ports: ports:
- "8000:8000" - "8100:8000"
env_file: ./backend/.env env_file: ./backend/.env
depends_on: depends_on:
- db - db
- redis - redis
working_dir: /app
environment:
- PYTHONPATH=/app
command: > command: >
sh -c " sh -c "
pip install alembic psycopg2-binary && pip install alembic psycopg2-binary &&
cd /app &&
alembic upgrade head && alembic upgrade head &&
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
" "

View File

@@ -7,7 +7,7 @@ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:8000', target: 'http://backend:8000',
changeOrigin: true, changeOrigin: true,
}, },
}, },