Add isolatedVMP port and update Dockerfile for IsolatedVM

This commit is contained in:
Simon Larsen 2024-04-05 18:33:52 +01:00
parent 1ad1aebc1b
commit 36f290edf0
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
6 changed files with 30 additions and 5 deletions

View File

@ -0,0 +1,10 @@
# OneUptime isolatedVM Deployment
{{- $isolatedVMEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers.isolatedVM "PORT" $.Values.port.isolatedVM -}}
{{- $isolatedVMDeploymentArgs :=dict "ServiceName" "isolated-vm" "Port" $.Values.port.isolatedVM "Release" $.Release "Values" $.Values "Env" $isolatedVMEnv -}}
{{- include "oneuptime.deployment" $isolatedVMDeploymentArgs }}
---
# OneUptime isolatedVM autoscaler
{{- $isolatedVMAutoScalerArgs := dict "ServiceName" "isolated-vm" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $isolatedVMAutoScalerArgs }}
---

View File

@ -157,6 +157,7 @@ port:
probe: 3500
otelCollectorGrpc: 4317
otelCollectorHttp: 4318
isolatedVMP: 4572
testServer:

View File

@ -1,5 +1,5 @@
#
# OneUptime-ingestor Dockerfile
# OneUptime-IsolatedVM Dockerfile
#
# Pull base image nodejs image.
@ -52,19 +52,19 @@ ENV PRODUCTION=true
WORKDIR /usr/src/app
# Install app dependencies
COPY ./Ingestor/package*.json /usr/src/app/
COPY ./IsolatedVM/package*.json /usr/src/app/
RUN npm install
# Expose ports.
# - 3400: OneUptime-ingestor
EXPOSE 3400
# - 4572: OneUptime-IsolatedVM
EXPOSE 4572
{{ if eq .Env.ENVIRONMENT "development" }}
#Run the app
CMD [ "npm", "run", "dev" ]
{{ else }}
# Copy app source
COPY ./Ingestor /usr/src/app
COPY ./IsolatedVM /usr/src/app
# Bundle app source
RUN npm run compile
#Run the app

View File

@ -3,6 +3,8 @@ import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import logger from 'CommonServer/Utils/Logger';
import App from 'CommonServer/Utils/StartServer';
import process from 'process';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
const app: ExpressApplication = Express.getExpressApp();

View File

@ -101,6 +101,7 @@ STATUS_PAGE_PORT=3105
DASHBOARD_PORT=3009
ADMIN_DASHBOARD_PORT=3158
OTEL_COLLECTOR_HTTP_PORT=4318
ISOLATED_VM_PORT=4572
# If USE_INTERNAL_SMTP is true then you need to fill these values.

View File

@ -310,6 +310,17 @@ services:
options:
max-size: "1000m"
isolated-vm:
networks:
- oneuptime
restart: always
environment:
PORT: ${ISOLATED_VM_PORT}
logging:
driver: "local"
options:
max-size: "1000m"
ingestor:
networks:
- oneuptime