Skip to content

Conductor refactor #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/composer/src/commands/baseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export abstract class Command {
Logger.debug`Running ${this.name} command with debug enabled`;
}

Logger.header(`♫ Generating ${this.name} Configurations`);
Logger.header(`\n♫ Generating ${this.name} Configurations`);

// Validate input arguments
await this.validate(cliOutput);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"index_patterns": [
"datatable1-*"
],
"index_patterns": ["datatable1-*"],
"aliases": {
"datatable1_centric": {}
},
Expand Down Expand Up @@ -117,4 +115,4 @@
"number_of_shards": 1,
"number_of_replicas": 0
}
}
}
59 changes: 59 additions & 0 deletions apps/conductor/configs/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
server {
listen 80;
listen [::]:80;
server_name localhost;

# Stage Frontend
location / {
proxy_pass http://localhost:3000;
include proxy_params;
}

# General Arranger APIs (for direct access)
location /datatable1-api/ {
proxy_pass http://localhost:5050/;
include proxy_params;
}

location /datatable2-api/ {
proxy_pass http://localhost:5051/;
include proxy_params;
}

location /lyric/ {
proxy_pass http://localhost:3030/;
include proxy_params;
}

location /lectern/ {
proxy_pass http://localhost:3031/;
include proxy_params;
}

location /song/ {
proxy_pass http://localhost:8080/;
include proxy_params;
}

location /score/ {
proxy_pass http://localhost:8087/;
include proxy_params;
}

location /maestro/ {
proxy_pass http://localhost:11235/;
include proxy_params;
}

# Elasticsearch endpoint
location /es/ {
proxy_pass http://localhost:9200/;
include proxy_params;
}

# Minio object storage
location /minio/ {
proxy_pass http://localhost:9000/;
include proxy_params;
}
}
44 changes: 44 additions & 0 deletions apps/conductor/configs/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
user www-data;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 1024;
}

http {
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
keepalive_timeout 65;

# Gzip Settings
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/javascript;
gzip_disable "MSIE [1-6]\.";

# Security headers
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

# Include all .conf files in conf.d directory
include /etc/nginx/conf.d/*.conf;
}
89 changes: 89 additions & 0 deletions apps/conductor/configs/nginx/portal
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Generic Nginx Site Configuration Template
# This template shows the structure - the actual script generates config dynamically
# Replace {SITE_NAME} and {PORT_*} with actual values

# Main site
server {
listen 80;
listen [::]:80;
server_name {SITE_NAME};

# Frontend application
location / {
proxy_pass http://localhost:{FRONTEND_PORT};
include proxy_params;
}

# API endpoints for arranger datasets
# These paths are expected by the frontend
location /api/dataset_1_arranger/ {
proxy_pass http://localhost:{ARRANGER_1_PORT}/;
include proxy_params;
}

# Add more dataset endpoints as needed:
# location /api/dataset_2_arranger/ {
# proxy_pass http://localhost:{ARRANGER_2_PORT}/;
# include proxy_params;
# }
}

# Lyric API service
server {
listen 80;
listen [::]:80;
server_name lyric.{SITE_NAME};

location / {
proxy_pass http://localhost:{LYRIC_PORT}/;
include proxy_params;
}
}

# Arranger 1 service
server {
listen 80;
listen [::]:80;
server_name arranger_1.{SITE_NAME};

location / {
proxy_pass http://localhost:{ARRANGER_1_PORT}/;
include proxy_params;
}
}

# Lectern service
server {
listen 80;
listen [::]:80;
server_name lectern.{SITE_NAME};

location / {
proxy_pass http://localhost:{LECTERN_PORT}/;
include proxy_params;
}
}

# Maestro service
server {
listen 80;
listen [::]:80;
server_name maestro.{SITE_NAME};

location / {
proxy_pass http://localhost:{MAESTRO_PORT}/;
include proxy_params;
}
}

# Elasticsearch service
server {
listen 80;
listen [::]:80;
server_name es.{SITE_NAME};

location / {
proxy_pass http://localhost:{ES_PORT}/;
include proxy_params;
}
}
22 changes: 22 additions & 0 deletions apps/conductor/configs/nginx/proxy_params
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Basic proxy settings
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
proxy_buffering on;
proxy_buffer_size 8k;
proxy_buffers 8 8k;

# Headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# Websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# Prevent upgrading to https
proxy_hide_header Strict-Transport-Security;
proxy_hide_header Content-Security-Policy;
Loading