refactor: change ports to non-standard (backend: 8765, frontend: 4321)

This commit is contained in:
TheRaiwy
2026-06-01 13:35:58 +03:00
parent e11df2ff92
commit df81f7abcc
6 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -7,6 +7,6 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . . 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"]
+1 -1
View File
@@ -10,7 +10,7 @@ app = FastAPI(title="Kopilka API", version="1.0.0")
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["http://localhost:5173", "http://localhost:3000"], allow_origins=["http://localhost:5173", "http://localhost:4321"],
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],
+2 -2
View File
@@ -4,7 +4,7 @@ services:
context: ./backend context: ./backend
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8000:8000" - "8765:8765"
environment: environment:
- PYTHONUNBUFFERED=1 - PYTHONUNBUFFERED=1
volumes: volumes:
@@ -16,7 +16,7 @@ services:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "3000:3000" - "4321:4321"
depends_on: depends_on:
- backend - backend
restart: unless-stopped restart: unless-stopped
+1 -1
View File
@@ -9,5 +9,5 @@ RUN npm run build
FROM nginx:alpine FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000 EXPOSE 4321
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+2 -2
View File
@@ -1,9 +1,9 @@
server { server {
listen 3000; listen 4321;
server_name _; server_name _;
resolver 127.0.0.11 valid=10s; resolver 127.0.0.11 valid=10s;
set $backend_url http://backend:8000; set $backend_url http://backend:8765;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
+2 -2
View File
@@ -5,9 +5,9 @@ export default defineConfig({
plugins: [react()], plugins: [react()],
server: { server: {
host: true, host: true,
port: 3000, port: 4321,
proxy: { proxy: {
'/api': 'http://backend:8000', '/api': 'http://backend:8765',
}, },
}, },
}) })