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
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
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 = [
|
||||
"Медведь",
|
||||
"Ксения",
|
||||
|
||||
@@ -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'],
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user