diff --git a/backend/Dockerfile b/backend/Dockerfile index 385ccd3..b693b16 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,6 +7,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . -EXPOSE 8000 +EXPOSE 8765 -CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8765"] diff --git a/backend/app/main.py b/backend/app/main.py index 8f4a695..406147a 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -10,7 +10,7 @@ app = FastAPI(title="Kopilka API", version="1.0.0") app.add_middleware( CORSMiddleware, - allow_origins=["http://localhost:5173", "http://localhost:3000"], + allow_origins=["http://localhost:5173", "http://localhost:4321"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/docker-compose.yml b/docker-compose.yml index 2b6c47d..ec90130 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: context: ./backend dockerfile: Dockerfile ports: - - "8000:8000" + - "8765:8765" environment: - PYTHONUNBUFFERED=1 volumes: @@ -16,7 +16,7 @@ services: context: ./frontend dockerfile: Dockerfile ports: - - "3000:3000" + - "4321:4321" depends_on: - backend restart: unless-stopped diff --git a/frontend/Dockerfile b/frontend/Dockerfile index eaa5a7f..4e5bb89 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -9,5 +9,5 @@ RUN npm run build FROM nginx:alpine COPY --from=builder /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf -EXPOSE 3000 +EXPOSE 4321 CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 62f98db..6446c06 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -1,9 +1,9 @@ server { - listen 3000; + listen 4321; server_name _; resolver 127.0.0.11 valid=10s; - set $backend_url http://backend:8000; + set $backend_url http://backend:8765; root /usr/share/nginx/html; index index.html; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 8279d17..d254bf8 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -5,9 +5,9 @@ export default defineConfig({ plugins: [react()], server: { host: true, - port: 3000, + port: 4321, proxy: { - '/api': 'http://backend:8000', + '/api': 'http://backend:8765', }, }, })