mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Refactor frontend build and deployment scripts; consolidate services into a single app
- Updated package.json in StatusPage to correct dependency path for Common. - Enhanced main package.json with new scripts for building and watching frontend applications. - Modified tsconfig.json to exclude frontend directories from compilation. - Simplified Nginx configuration by removing individual upstreams for each service and routing all to a single app upstream. - Refactored configure.sh to streamline Dockerfile generation. - Cleaned up docker-compose files by consolidating services and removing unnecessary definitions. - Introduced new frontend handling logic in Index.ts for rendering different frontend applications. - Added utility functions for managing status page data and RSS feeds in StatusPage.ts. - Created dev.sh and frontend-run.sh scripts to facilitate development and build processes for frontend applications.
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
server_names_hash_bucket_size ${SERVER_NAMES_HASH_BUCKET_SIZE};
|
||||
server_names_hash_max_size ${SERVER_NAMES_HASH_MAX_SIZE};
|
||||
|
||||
upstream accounts {
|
||||
server ${SERVER_ACCOUNTS_HOSTNAME}:${ACCOUNTS_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
upstream app {
|
||||
server ${SERVER_APP_HOSTNAME}:${APP_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
@@ -15,15 +11,6 @@ upstream telemetry {
|
||||
server ${SERVER_TELEMETRY_HOSTNAME}:${TELEMETRY_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
upstream dashboard {
|
||||
server ${SERVER_DASHBOARD_HOSTNAME}:${DASHBOARD_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
upstream admin-dashboard {
|
||||
server ${SERVER_ADMIN_DASHBOARD_HOSTNAME}:${ADMIN_DASHBOARD_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
|
||||
upstream worker {
|
||||
server ${SERVER_WORKER_HOSTNAME}:${WORKER_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
@@ -40,10 +27,6 @@ upstream home {
|
||||
server ${SERVER_HOME_HOSTNAME}:${HOME_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
upstream status-page {
|
||||
server ${SERVER_STATUS_PAGE_HOSTNAME}:${STATUS_PAGE_PORT} weight=10 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
upstream opentelemetry-collector-http {
|
||||
server ${SERVER_OTEL_COLLECTOR_HOSTNAME}:4318;
|
||||
}
|
||||
@@ -92,7 +75,7 @@ server {
|
||||
}
|
||||
|
||||
if ($billing_enabled != true) {
|
||||
proxy_pass http://status-page;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -111,7 +94,7 @@ server {
|
||||
}
|
||||
|
||||
if ($billing_enabled != true) {
|
||||
proxy_pass http://status-page;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +206,7 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://status-page;
|
||||
proxy_pass http://app;
|
||||
|
||||
|
||||
}
|
||||
@@ -289,7 +272,7 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://status-page;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +322,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
}
|
||||
|
||||
if ($billing_enabled != true) {
|
||||
proxy_pass http://dashboard;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,7 +384,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
}
|
||||
|
||||
if ($billing_enabled != true) {
|
||||
proxy_pass http://dashboard;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +450,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass http://accounts;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
|
||||
@@ -644,7 +627,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
proxy_pass http://dashboard;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
# PWA manifest and service worker with proper headers
|
||||
@@ -670,7 +653,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
add_header Cache-Control "public, max-age=86400" always;
|
||||
}
|
||||
|
||||
proxy_pass http://dashboard;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
|
||||
@@ -686,7 +669,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass http://admin-dashboard;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
location /worker {
|
||||
@@ -717,7 +700,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://status-page;
|
||||
proxy_pass http://app;
|
||||
}
|
||||
|
||||
location /identity {
|
||||
|
||||
Reference in New Issue
Block a user