From ef5c451c8da4bb4478f3c9be96d5ee599ba9e5f6 Mon Sep 17 00:00:00 2001 From: tylen Date: Tue, 5 May 2026 12:00:12 +0300 Subject: [PATCH] make initial changes to fqdn and docker --- README.md | 2 +- backend/src/db_client.py | 2 +- backend/src/server.py | 2 +- docker-compose.yaml | 16 +++++----------- frontend/src/constants/constants.ts | 2 +- frontend/vite.config.ts | 2 +- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 25df823..4ab5ad7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# nyipyatki +# juhannus Repository for inviting our friends to new year \ No newline at end of file diff --git a/backend/src/db_client.py b/backend/src/db_client.py index fa5fdc9..051ede6 100644 --- a/backend/src/db_client.py +++ b/backend/src/db_client.py @@ -61,7 +61,7 @@ class DBClient: self.pool = self.create_pool() # Create a connection pool self.initialize_database() - self.initialize_secret_santa() # Initialize Secret Santa + #self.initialize_secret_santa() # Initialize Secret Santa def validate_env_variables(self): if not self.db_server or not self.db_port or not self.password or not self.database: diff --git a/backend/src/server.py b/backend/src/server.py index 5c478e7..05c5412 100644 --- a/backend/src/server.py +++ b/backend/src/server.py @@ -18,7 +18,7 @@ app = Flask(__name__) app.config['JSON_AS_ASCII'] = False # Ensures non-ASCII characters are preserved logging.basicConfig(level=logging.INFO) allowed_origins = [ - "https://nyipyatki.davydovcloud.com", + "https://juhannus.davylis.com", "http://192.168.100.*", ] CORS(app, resources={r"*": {"origins": allowed_origins}}) # Only allow example.com diff --git a/docker-compose.yaml b/docker-compose.yaml index d4bb9a8..e9f2255 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,29 +4,23 @@ services: context: backend dockerfile: Dockerfile restart: always - ports: - - "2027:5000" - container_name: "${BACKEND_CT_NAME:-nyi-backend}" + container_name: "${BACKEND_CT_NAME:-juhannus-invitation-backend}" depends_on: - db # Ensure backend waits for db to start db: image: mysql:9.4.0 - container_name: nyi-db - ports: - - "${DB_SERVER}:${DB_PORT}:3306" + container_name: juhannus-invitation-db environment: - MYSQL_ROOT_PASSWORD=${ROOT_PWD} - MYSQL_DATABASE=${DB_NAME} volumes: - - nyi_db_volume:/var/lib/mysql + - invitation_db_volume:/var/lib/mysql frontend: build: context: frontend dockerfile: Dockerfile - ports: - - "2028:80" - container_name: "${FRONTEND_CT_NAME:-nyi-frontend}" + container_name: "${FRONTEND_CT_NAME:-juhannus-invitation-frontend}" depends_on: - backend # Ensure fronetnd waits for backend to start volumes: - nyi_db_volume: \ No newline at end of file + invitation_db_volume: diff --git a/frontend/src/constants/constants.ts b/frontend/src/constants/constants.ts index 398a2a2..2b3d78f 100644 --- a/frontend/src/constants/constants.ts +++ b/frontend/src/constants/constants.ts @@ -1,5 +1,5 @@ -export const API_URL = 'https://nyipyatki-backend.davydovcloud.com'; +export const API_URL = 'https://juhannus-backend.davylis.com'; export const GUESTS = [ "Медведь", "Ксения", diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index d54add8..35cff03 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -5,6 +5,6 @@ import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { - allowedHosts: ['nyipyatki-dev.davydovcloud.com'], + allowedHosts: ['juhannus-dev.davylis.com'], } })