mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:40:43 +00:00
fix region env variable, fix metric name typo
This commit is contained in:
@@ -30,21 +30,24 @@ fi
|
||||
REGION=$1
|
||||
VERSION_TAG="latest"
|
||||
DOCKER_REPO=""
|
||||
ENV=""
|
||||
|
||||
# Set environment-specific variables
|
||||
if [ "$REGION" == "staging" ]; then
|
||||
print_header "DEPLOYING TO STAGING ENVIRONMENT"
|
||||
SERVER_HOST=$SERVER_HOST_STAGING
|
||||
DOCKER_REPO=$DOCKER_REPO_STAGING
|
||||
ENV="staging"
|
||||
elif [ "$REGION" == "us" ]; then
|
||||
print_header "DEPLOYING TO US ENVIRONMENT"
|
||||
SERVER_HOST=$SERVER_HOST_US
|
||||
DOCKER_REPO=$DOCKER_REPO_PROD # Uses prod Docker repo for alt environment
|
||||
REGION="prod"
|
||||
ENV="prod"
|
||||
else
|
||||
print_header "DEPLOYING TO EU ENVIRONMENT"
|
||||
SERVER_HOST=$SERVER_HOST_EU
|
||||
DOCKER_REPO=$DOCKER_REPO_PROD
|
||||
ENV="prod"
|
||||
fi
|
||||
|
||||
# Check required environment variables
|
||||
|
||||
@@ -13,21 +13,21 @@ promClient.collectDefaultMetrics({ register });
|
||||
|
||||
// Add worker-specific metrics
|
||||
const activeGamesGauge = new promClient.Gauge({
|
||||
name: "openfont_active_games_count",
|
||||
name: "openfront_active_games_count",
|
||||
help: "Number of active games on this worker",
|
||||
labelNames: ["region"],
|
||||
registers: [register],
|
||||
});
|
||||
|
||||
const connectedClientsGauge = new promClient.Gauge({
|
||||
name: "openfont_connected_clients_count",
|
||||
name: "openfront_connected_clients_count",
|
||||
help: "Number of connected clients on this worker",
|
||||
labelNames: ["region"],
|
||||
registers: [register],
|
||||
});
|
||||
|
||||
const memoryUsageGauge = new promClient.Gauge({
|
||||
name: "openfont_memory_usage_bytes",
|
||||
name: "openfront_memory_usage_bytes",
|
||||
help: "Current memory usage of the worker process in bytes",
|
||||
labelNames: ["region"],
|
||||
registers: [register],
|
||||
|
||||
Reference in New Issue
Block a user