diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2504dec..9ee9594 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,5 +13,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - run: docker compose -f docker-compose.yml build + - run: cp /home/hasan/ituacm_website_backend/.env ./ + - 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 c3187ae..f7a8cd3 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -25,4 +25,4 @@ COPY ./prestart.sh /app/ COPY ./tests-start.sh /app/ -COPY ./app /app/app +COPY ./app /app/app \ No newline at end of file diff --git a/backend/app/main.py b/backend/app/main.py index 4c252a1..00d51cb 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -22,6 +22,18 @@ 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, allow_origins=[