diff --git a/DockerApiServices/AuthServiceApi/app_handler.py b/DockerApiServices/AuthServiceApi/app_handler.py index e46c2c9..23572cd 100644 --- a/DockerApiServices/AuthServiceApi/app_handler.py +++ b/DockerApiServices/AuthServiceApi/app_handler.py @@ -32,7 +32,7 @@ def setup_cors_middleware(app: FastAPI) -> None: """ app.add_middleware( CORSMiddleware, - allow_origins=["*"], + allow_origins=["http://localhost:3000","*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/DockerApiServices/AuthServiceApi/config.py b/DockerApiServices/AuthServiceApi/config.py index b8dd8f9..bfe00c1 100644 --- a/DockerApiServices/AuthServiceApi/config.py +++ b/DockerApiServices/AuthServiceApi/config.py @@ -48,7 +48,7 @@ class ApiConfig(DefaultApiConfig): # Server Configuration app = "app:app" host = "0.0.0.0" - port = 41575 + port = 8888 log_level = "info" reload = True diff --git a/DockerApiServices/EventServiceApi/app_handler.py b/DockerApiServices/EventServiceApi/app_handler.py index 7050498..6d6a370 100644 --- a/DockerApiServices/EventServiceApi/app_handler.py +++ b/DockerApiServices/EventServiceApi/app_handler.py @@ -27,7 +27,7 @@ def setup_cors_middleware(app: FastAPI) -> None: """ app.add_middleware( CORSMiddleware, - allow_origins=["*"], + allow_origins=["http://localhost:3000","*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/DockerApiServices/EventServiceApi/config.py b/DockerApiServices/EventServiceApi/config.py index 24c43bb..9badac2 100644 --- a/DockerApiServices/EventServiceApi/config.py +++ b/DockerApiServices/EventServiceApi/config.py @@ -43,7 +43,7 @@ class ApiConfig(DefaultApiConfig): # Uvicorn server configuration app = "app:app" host = "0.0.0.0" - port = 41576 + port = 8888 log_level = "info" reload = True diff --git a/DockerApiServices/ValidationServiceApi/app_handler.py b/DockerApiServices/ValidationServiceApi/app_handler.py index 7050498..6d6a370 100644 --- a/DockerApiServices/ValidationServiceApi/app_handler.py +++ b/DockerApiServices/ValidationServiceApi/app_handler.py @@ -27,7 +27,7 @@ def setup_cors_middleware(app: FastAPI) -> None: """ app.add_middleware( CORSMiddleware, - allow_origins=["*"], + allow_origins=["http://localhost:3000","*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/DockerApiServices/ValidationServiceApi/config.py b/DockerApiServices/ValidationServiceApi/config.py index bb77af3..66bb21a 100644 --- a/DockerApiServices/ValidationServiceApi/config.py +++ b/DockerApiServices/ValidationServiceApi/config.py @@ -42,7 +42,7 @@ class ApiConfig(DefaultApiConfig): # App configuration app = "app:app" host = "0.0.0.0" - port = 41577 + port = 8888 log_level = "info" reload = True diff --git a/Events/AllEvents/events/account/info.py b/Events/AllEvents/events/account/info.py index c7ba706..4acbc0d 100644 --- a/Events/AllEvents/events/account/info.py +++ b/Events/AllEvents/events/account/info.py @@ -14,6 +14,72 @@ from .lang_models import ( ) +currentData = dict( + NAME="AccountCluster", + PREFIX="/accounts", + URL="/dashboard?site=AccountCluster", + ICON="Building", + INFO={ + "en": { + "page": "Account Records for reaching user all types account information", + }, + "tr": { + "page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları", + }, + }, + SUBCATEGORIES={ + "/accounts/create": { + "SITE_URL": "/events/create?site=AccountCluster", + "COMPONENT": "Link", + "PREFIX_URL": "/accounts/create", + "INFO": { + "en": { + "page": "Create Account Records", + "actions": "Actions", + "table": "Table", + }, + "tr": { + "page": "Hesap Kayıdı Oluştur", + "actions": "Aksiyonlar", + "table": "Tablo", + }, + }, + "INSTRUCTIONS": None, + }, + "/accounts/list": { + "SITE_URL": "/events/dashboard?site=AccountCluster", + "COMPONENT": "Table", + "PREFIX_URL": "/accounts/list", + "INFO": { + "en": { "page": "List Account Records" }, + "tr": { "page": "Hesap Kayıtlarını Listele" }, + }, + "INSTRUCTIONS": { + "headers": { + "store": True, + "url": "/validations/header", + "data": { + "event_code": "/accounts/list", + "asked_field": "headers", + }, + }, + "data": { + "store": True, + "url": "/accounts/list", + "data": { + "page": 1, + "limit": 1, + "order_by": "uu_id", + "order_type": "desc", + "query": None, + }, + }, + }, + }, + }, + ) + + class ClustersPageInfo: # Cluster Page Infos that are available for the client diff --git a/docker-compose-services.yml b/docker-compose-services.yml index dce6262..6008e40 100644 --- a/docker-compose-services.yml +++ b/docker-compose-services.yml @@ -1,32 +1,47 @@ services: - init-service: + initservice: + container_name: initservice build: context: . dockerfile: DockerApiServices/InitServiceApi/Dockerfile - auth-service: + authservice: + container_name: authservice build: context: . dockerfile: DockerApiServices/AuthServiceApi/Dockerfile ports: - - "8081:41575" + - "8081:8888" depends_on: - - init-service + - initservice + networks: + - wag-network - validation-service: + validationservice: + container_name: validationservice build: - context: . - dockerfile: DockerApiServices/ValidationServiceApi/Dockerfile + context: . + dockerfile: DockerApiServices/ValidationServiceApi/Dockerfile ports: - - "8082:41577" + - "8082:8888" depends_on: - - init-service + - initservice + networks: + - wag-network - event-service: + eventservice: + container_name: eventservice build: - context: . - dockerfile: DockerApiServices/EventServiceApi/Dockerfile + context: . + dockerfile: DockerApiServices/EventServiceApi/Dockerfile ports: - - "8083:41576" + - "8083:8888" depends_on: - - init-service + - initservice + networks: + - wag-network + +networks: + wag-network: + name: wag-network + external: true diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..b9a620d --- /dev/null +++ b/run.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Check if wag-network exists +if ! docker network ls | grep -q "wag-network"; then + echo "Creating wag-network..." + docker network create wag-network +else + echo "wag-network already exists" +fi + +# Bring down existing containers +echo "Stopping and removing existing containers..." +docker compose down --remove-orphans + +# Build and start containers +echo "Building and starting containers..." +docker compose -f docker-compose-services.yml up --build -d + +# Add container to wag-network +echo "Adding container to wag-network..." +docker container inspect authservice > /dev/null && docker network connect wag-network authservice +docker container inspect eventservice > /dev/null && docker network connect wag-network eventservice +docker container inspect validationservice > /dev/null && docker network connect wag-network validationservice + +# Run migrations +echo "Setup complete! Backend Services Auth | Event | Validation are running..."