add admin dash to docker compose

This commit is contained in:
Simon Larsen 2023-08-25 15:51:26 +01:00
parent d3216b0d5f
commit 8462fede09
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
3 changed files with 45 additions and 1 deletions

View File

@ -19,6 +19,7 @@ x-common-ui-variables: &common-ui-variables
REALTIME_ROUTE: ${REALTIME_ROUTE} REALTIME_ROUTE: ${REALTIME_ROUTE}
NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE} NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE}
DASHBOARD_ROUTE: ${DASHBOARD_ROUTE} DASHBOARD_ROUTE: ${DASHBOARD_ROUTE}
ADMIN_DASHBOARD_ROUTE: ${ADMIN_DASHBOARD_ROUTE}
DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE} DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE}
PROBE_API_ROUTE: ${PROBE_API_ROUTE} PROBE_API_ROUTE: ${PROBE_API_ROUTE}
DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE} DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE}
@ -61,6 +62,7 @@ x-common-server-variables: &common-server-variables
REALTIME_HOSTNAME: ${REALTIME_HOSTNAME} REALTIME_HOSTNAME: ${REALTIME_HOSTNAME}
NOTIFICATION_HOSTNAME: ${NOTIFICATION_HOSTNAME} NOTIFICATION_HOSTNAME: ${NOTIFICATION_HOSTNAME}
DASHBOARD_HOSTNAME: ${DASHBOARD_HOSTNAME} DASHBOARD_HOSTNAME: ${DASHBOARD_HOSTNAME}
ADMIN_DASHBOARD_HOSTNAME: ${ADMIN_DASHBOARD_HOSTNAME}
DASHBOARD_API_HOSTNAME: ${DASHBOARD_API_HOSTNAME} DASHBOARD_API_HOSTNAME: ${DASHBOARD_API_HOSTNAME}
PROBE_API_HOSTNAME: ${DATA_INGESTOR_HOSTNAME} PROBE_API_HOSTNAME: ${DATA_INGESTOR_HOSTNAME}
DATA_INGESTOR_HOSTNAME: ${DATA_INGESTOR_HOSTNAME} DATA_INGESTOR_HOSTNAME: ${DATA_INGESTOR_HOSTNAME}
@ -76,6 +78,7 @@ x-common-server-variables: &common-server-variables
REALTIME_ROUTE: ${REALTIME_ROUTE} REALTIME_ROUTE: ${REALTIME_ROUTE}
NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE} NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE}
DASHBOARD_ROUTE: ${DASHBOARD_ROUTE} DASHBOARD_ROUTE: ${DASHBOARD_ROUTE}
ADMIN_DASHBOARD_ROUTE: ${ADMIN_DASHBOARD_ROUTE}
DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE} DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE}
PROBE_API_ROUTE: ${PROBE_API_ROUTE} PROBE_API_ROUTE: ${PROBE_API_ROUTE}
DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE} DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE}
@ -202,6 +205,17 @@ services:
- identity - identity
admin-dashboard:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${ADMIN_DASHBOARD_PORT}
depends_on:
- identity
- accounts
dashboard: dashboard:
networks: networks:
- oneuptime - oneuptime

View File

@ -118,6 +118,32 @@ services:
admin-dashboard:
ports:
- '${ADMIN_DASHBOARD_PORT}:${ADMIN_DASHBOARD_PORT}' # ws port for webpack
extends:
file: ./docker-compose.base.yml
service: admin-dashboard
volumes:
- ./AdminDashboard:/usr/src/app
# 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
- ./Model:/usr/src/Model
- ./CommonServer:/usr/src/CommonServer
- ./CommonUI:/usr/src/CommonUI
- /usr/src/Common/node_modules/
- /usr/src/CommonUI/node_modules/
- /usr/src/CommonServer/node_modules/
- /usr/src/Model/node_modules/
build:
network: host
context: .
dockerfile: ./AdminDashboard/Dockerfile
status-page: status-page:
ports: ports:
- '${STATUS_PAGE_PORT}:${STATUS_PAGE_PORT}' # ws port for webpack - '${STATUS_PAGE_PORT}:${STATUS_PAGE_PORT}' # ws port for webpack

View File

@ -51,7 +51,11 @@ services:
file: ./docker-compose.base.yml file: ./docker-compose.base.yml
service: dashboard service: dashboard
admin-dashboard:
image: oneuptime/admin-dashboard:${APP_TAG}
extends:
file: ./docker-compose.base.yml
service: admin-dashboard
status-page: status-page:
image: oneuptime/status-page:${APP_TAG} image: oneuptime/status-page:${APP_TAG}