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:
@@ -45,107 +45,6 @@ services:
|
||||
context: .
|
||||
dockerfile: ./OTelCollector/Dockerfile
|
||||
|
||||
accounts:
|
||||
ports:
|
||||
- '${ACCOUNTS_PORT}:${ACCOUNTS_PORT}'
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: accounts
|
||||
depends_on:
|
||||
<<: *common-depends-on
|
||||
volumes:
|
||||
- ./Accounts:/usr/src/app:cached
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common:cached
|
||||
|
||||
- /usr/src/Common/node_modules/
|
||||
|
||||
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
dockerfile: ./Accounts/Dockerfile
|
||||
|
||||
|
||||
dashboard:
|
||||
ports:
|
||||
- '${DASHBOARD_PORT}:${DASHBOARD_PORT}'
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: dashboard
|
||||
depends_on:
|
||||
<<: *common-depends-on
|
||||
volumes:
|
||||
- ./Dashboard:/usr/src/app:cached
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common:cached
|
||||
|
||||
- /usr/src/Common/node_modules/
|
||||
|
||||
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
dockerfile: ./Dashboard/Dockerfile
|
||||
|
||||
|
||||
|
||||
admin-dashboard:
|
||||
ports:
|
||||
- '${ADMIN_DASHBOARD_PORT}:${ADMIN_DASHBOARD_PORT}'
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: admin-dashboard
|
||||
depends_on:
|
||||
<<: *common-depends-on
|
||||
volumes:
|
||||
- ./AdminDashboard:/usr/src/app:cached
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common:cached
|
||||
|
||||
- /usr/src/Common/node_modules/
|
||||
|
||||
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
dockerfile: ./AdminDashboard/Dockerfile
|
||||
|
||||
|
||||
status-page:
|
||||
ports:
|
||||
- '${STATUS_PAGE_PORT}:${STATUS_PAGE_PORT}'
|
||||
extends:
|
||||
file: ./docker-compose.base.yml
|
||||
service: status-page
|
||||
depends_on:
|
||||
<<: *common-depends-on
|
||||
volumes:
|
||||
- ./StatusPage:/usr/src/app:cached
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/dev-env
|
||||
- /usr/src/app/node_modules/
|
||||
- ./Common:/usr/src/Common:cached
|
||||
|
||||
- /usr/src/Common/node_modules/
|
||||
|
||||
|
||||
build:
|
||||
network: host
|
||||
context: .
|
||||
dockerfile: ./StatusPage/Dockerfile
|
||||
|
||||
|
||||
test-server:
|
||||
volumes:
|
||||
- ./TestServer:/usr/src/app:cached
|
||||
@@ -255,9 +154,17 @@ services:
|
||||
app:
|
||||
volumes:
|
||||
- ./App:/usr/src/app:cached
|
||||
- ./App/Accounts:/usr/src/app/Accounts:cached
|
||||
- ./App/Dashboard:/usr/src/app/Dashboard:cached
|
||||
- ./App/AdminDashboard:/usr/src/app/AdminDashboard:cached
|
||||
- ./App/StatusPage:/usr/src/app/StatusPage:cached
|
||||
# Use node modules of the container and not host system.
|
||||
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
||||
- /usr/src/app/node_modules/
|
||||
- /usr/src/app/Accounts/node_modules/
|
||||
- /usr/src/app/Dashboard/node_modules/
|
||||
- /usr/src/app/AdminDashboard/node_modules/
|
||||
- /usr/src/app/StatusPage/node_modules/
|
||||
- ./Common:/usr/src/Common:cached
|
||||
- /usr/src/Common/node_modules/
|
||||
extends:
|
||||
|
||||
Reference in New Issue
Block a user