make initial changes to fqdn and docker
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
# nyipyatki
|
# juhannus
|
||||||
|
|
||||||
Repository for inviting our friends to new year
|
Repository for inviting our friends to new year
|
||||||
@@ -61,7 +61,7 @@ class DBClient:
|
|||||||
self.pool = self.create_pool() # Create a connection pool
|
self.pool = self.create_pool() # Create a connection pool
|
||||||
|
|
||||||
self.initialize_database()
|
self.initialize_database()
|
||||||
self.initialize_secret_santa() # Initialize Secret Santa
|
#self.initialize_secret_santa() # Initialize Secret Santa
|
||||||
|
|
||||||
def validate_env_variables(self):
|
def validate_env_variables(self):
|
||||||
if not self.db_server or not self.db_port or not self.password or not self.database:
|
if not self.db_server or not self.db_port or not self.password or not self.database:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ app = Flask(__name__)
|
|||||||
app.config['JSON_AS_ASCII'] = False # Ensures non-ASCII characters are preserved
|
app.config['JSON_AS_ASCII'] = False # Ensures non-ASCII characters are preserved
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
allowed_origins = [
|
allowed_origins = [
|
||||||
"https://nyipyatki.davydovcloud.com",
|
"https://juhannus.davylis.com",
|
||||||
"http://192.168.100.*",
|
"http://192.168.100.*",
|
||||||
]
|
]
|
||||||
CORS(app, resources={r"*": {"origins": allowed_origins}}) # Only allow example.com
|
CORS(app, resources={r"*": {"origins": allowed_origins}}) # Only allow example.com
|
||||||
|
|||||||
@@ -4,29 +4,23 @@ services:
|
|||||||
context: backend
|
context: backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
container_name: "${BACKEND_CT_NAME:-juhannus-invitation-backend}"
|
||||||
- "2027:5000"
|
|
||||||
container_name: "${BACKEND_CT_NAME:-nyi-backend}"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db # Ensure backend waits for db to start
|
- db # Ensure backend waits for db to start
|
||||||
db:
|
db:
|
||||||
image: mysql:9.4.0
|
image: mysql:9.4.0
|
||||||
container_name: nyi-db
|
container_name: juhannus-invitation-db
|
||||||
ports:
|
|
||||||
- "${DB_SERVER}:${DB_PORT}:3306"
|
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${ROOT_PWD}
|
- MYSQL_ROOT_PASSWORD=${ROOT_PWD}
|
||||||
- MYSQL_DATABASE=${DB_NAME}
|
- MYSQL_DATABASE=${DB_NAME}
|
||||||
volumes:
|
volumes:
|
||||||
- nyi_db_volume:/var/lib/mysql
|
- invitation_db_volume:/var/lib/mysql
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: frontend
|
context: frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
container_name: "${FRONTEND_CT_NAME:-juhannus-invitation-frontend}"
|
||||||
- "2028:80"
|
|
||||||
container_name: "${FRONTEND_CT_NAME:-nyi-frontend}"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend # Ensure fronetnd waits for backend to start
|
- backend # Ensure fronetnd waits for backend to start
|
||||||
volumes:
|
volumes:
|
||||||
nyi_db_volume:
|
invitation_db_volume:
|
||||||
|
|||||||
@@ -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 = [
|
export const GUESTS = [
|
||||||
"Медведь",
|
"Медведь",
|
||||||
"Ксения",
|
"Ксения",
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ import react from '@vitejs/plugin-react'
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
server: {
|
server: {
|
||||||
allowedHosts: ['nyipyatki-dev.davydovcloud.com'],
|
allowedHosts: ['juhannus-dev.davylis.com'],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user