From 2be0937ddc7e2d3985addf9841c02d593f6d053b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rojen=20Arda=20=C5=9Ee=C5=9Fen?= Date: Tue, 24 Sep 2024 00:09:51 +0300 Subject: [PATCH] sikerler --- .github/workflows/main.yml | 1 - backend/Dockerfile | 4 +--- backend/app/main.py | 11 +++++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 012d0cc..1597a0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - run: cp /home/hasan/ituacm_website_backend/.env ./ - run: cp /home/hasan/ituacm_website_backend/.env ./backend/ - run: docker compose -f docker-compose.yml build --no-cache - run: docker compose -f docker-compose.yml up -d \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile index b569dd3..f7a8cd3 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -25,6 +25,4 @@ COPY ./prestart.sh /app/ COPY ./tests-start.sh /app/ -COPY ./app /app/app - -COPY ./.env /app/.env \ No newline at end of file +COPY ./app /app/app \ No newline at end of file diff --git a/backend/app/main.py b/backend/app/main.py index b735ae9..00d51cb 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -22,6 +22,17 @@ def custom_generate_unique_id(route: APIRoute) -> str: # Set all CORS enabled origins if settings.BACKEND_CORS_ORIGINS: + settings.BACKEND_CORS_ORIGINS = [ + 'http://localhost', + 'http://localhost:5173', + 'https://localhost', + 'https://localhost:5173', + 'https://ituacm.com', + 'https://api.ituacm.com', + 'https://adminer.ituacm.com', + 'https://admin.ituacm.com', + 'http://admin.ituacm.com' + ] print(settings.BACKEND_CORS_ORIGINS) app.add_middleware( CORSMiddleware,