some updates
This commit is contained in:
parent
4d8b9effd0
commit
1bdc2b9ae0
228
config.sh
228
config.sh
@ -593,99 +593,6 @@ load_env_vars() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to update or create the map's .env file with domain settings
|
|
||||||
update_map_env() {
|
|
||||||
local new_domain=$1
|
|
||||||
|
|
||||||
# Check if the map directory exists
|
|
||||||
if [ ! -d "$SCRIPT_DIR/map" ]; then
|
|
||||||
echo "Map directory not found at $SCRIPT_DIR/map"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating/updating map .env file at: $MAP_ENV_FILE"
|
|
||||||
|
|
||||||
cat > "$MAP_ENV_FILE" << EOL
|
|
||||||
NOCODB_API_URL=https://db.$new_domain/api/v1
|
|
||||||
NOCODB_API_TOKEN=changeme
|
|
||||||
|
|
||||||
# NocoDB View URL is the URL to your NocoDB view where the map data is stored.
|
|
||||||
NOCODB_VIEW_URL=
|
|
||||||
|
|
||||||
# NOCODB_LOGIN_SHEET is the URL to your NocoDB login sheet.
|
|
||||||
NOCODB_LOGIN_SHEET=
|
|
||||||
|
|
||||||
# NOCODB_SETTINGS_SHEET is the URL to your NocoDB settings sheet.
|
|
||||||
NOCODB_SETTINGS_SHEET=
|
|
||||||
|
|
||||||
# NOCODB_SHIFTS_SHEET is the urls to your shifts sheets.
|
|
||||||
NOCODB_SHIFTS_SHEET=
|
|
||||||
|
|
||||||
# NOCODB_SHIFT_SIGNUPS_SHEET is the URL to your NocoDB shift signups sheet where users can add their own shifts.
|
|
||||||
NOCODB_SHIFT_SIGNUPS_SHEET=
|
|
||||||
|
|
||||||
# NOCODB_CUTS_SHEET is the URL to your Nocodb Cuts sheet.
|
|
||||||
NOCODB_CUTS_SHEET=
|
|
||||||
|
|
||||||
DOMAIN=$new_domain
|
|
||||||
|
|
||||||
# MkDocs Integration
|
|
||||||
MKDOCS_URL=https://$new_domain
|
|
||||||
MKDOCS_SEARCH_URL=https://$new_domain
|
|
||||||
MKDOCS_SITE_SERVER_PORT=4002
|
|
||||||
|
|
||||||
# Server Configuration
|
|
||||||
PORT=3000
|
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
# Session Secret (IMPORTANT: Generate a secure random string for production)
|
|
||||||
# You can generate one with: openssl rand -hex 32
|
|
||||||
SESSION_SECRET=$(openssl rand -hex 32 2>/dev/null || echo "changeme")
|
|
||||||
|
|
||||||
# Map Defaults (Edmonton, Alberta, Canada)
|
|
||||||
DEFAULT_LAT=53.5461
|
|
||||||
DEFAULT_LNG=-113.4938
|
|
||||||
DEFAULT_ZOOM=11
|
|
||||||
|
|
||||||
# Optional: Map Boundaries (prevents users from adding points outside area)
|
|
||||||
# BOUND_NORTH=53.7
|
|
||||||
# BOUND_SOUTH=53.4
|
|
||||||
# BOUND_EAST=-113.3
|
|
||||||
# BOUND_WEST=-113.7
|
|
||||||
|
|
||||||
# Cloudflare Settings
|
|
||||||
TRUST_PROXY=true
|
|
||||||
COOKIE_DOMAIN=.$new_domain
|
|
||||||
|
|
||||||
# Update NODE_ENV to production for HTTPS
|
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
# Add allowed origin
|
|
||||||
ALLOWED_ORIGINS=https://map.$new_domain,http://localhost:3000
|
|
||||||
|
|
||||||
# SMTP Configuration
|
|
||||||
SMTP_HOST=smtp.protonmail.ch
|
|
||||||
SMTP_PORT=587
|
|
||||||
SMTP_SECURE=false
|
|
||||||
SMTP_USER=changeme@$new_domain
|
|
||||||
SMTP_PASS=changeme
|
|
||||||
EMAIL_FROM_NAME="$new_domain Map"
|
|
||||||
EMAIL_FROM_ADDRESS=changeme@$new_domain
|
|
||||||
|
|
||||||
# App Configuration
|
|
||||||
APP_NAME="$new_domain Map"
|
|
||||||
|
|
||||||
# Listmonk Configuration
|
|
||||||
LISTMONK_API_URL=http://listmonk_app:9000/api
|
|
||||||
LISTMONK_USERNAME=changeme
|
|
||||||
LISTMONK_PASSWORD=changeme
|
|
||||||
LISTMONK_SYNC_ENABLED=true
|
|
||||||
LISTMONK_INITIAL_SYNC=true # Set to true only for first run to sync existing data
|
|
||||||
EOL
|
|
||||||
|
|
||||||
echo "Map .env file updated with domain: $new_domain"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to sync ports from root .env to map .env
|
# Function to sync ports from root .env to map .env
|
||||||
sync_map_ports() {
|
sync_map_ports() {
|
||||||
echo "Syncing ports from root .env to map configuration..."
|
echo "Syncing ports from root .env to map configuration..."
|
||||||
@ -923,6 +830,66 @@ EOL
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to check for port conflicts in existing .env file
|
||||||
|
check_port_conflicts() {
|
||||||
|
echo "Checking for port conflicts in existing configuration..."
|
||||||
|
|
||||||
|
# Get list of all used ports on system
|
||||||
|
local used_ports_list
|
||||||
|
used_ports_list=$(get_used_ports)
|
||||||
|
|
||||||
|
if [ $? -ne 0 ] || [ -z "$used_ports_list" ]; then
|
||||||
|
echo "Warning: Could not scan system ports. Skipping conflict check."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check each configured port
|
||||||
|
local -a conflicts=()
|
||||||
|
local -a port_vars=(
|
||||||
|
"CODE_SERVER_PORT"
|
||||||
|
"LISTMONK_PORT"
|
||||||
|
"LISTMONK_DB_PORT"
|
||||||
|
"MKDOCS_PORT"
|
||||||
|
"MKDOCS_SITE_SERVER_PORT"
|
||||||
|
"N8N_PORT"
|
||||||
|
"NOCODB_PORT"
|
||||||
|
"HOMEPAGE_PORT"
|
||||||
|
"GITEA_WEB_PORT"
|
||||||
|
"GITEA_SSH_PORT"
|
||||||
|
"MAP_PORT"
|
||||||
|
"INFLUENCE_PORT"
|
||||||
|
"MINI_QR_PORT"
|
||||||
|
"REDIS_PORT"
|
||||||
|
"PROMETHEUS_PORT"
|
||||||
|
"GRAFANA_PORT"
|
||||||
|
)
|
||||||
|
|
||||||
|
for var in "${port_vars[@]}"; do
|
||||||
|
local port_value="${!var}"
|
||||||
|
if [ -n "$port_value" ] && ! is_port_available "$port_value" "$used_ports_list"; then
|
||||||
|
conflicts+=("$var=$port_value")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${#conflicts[@]} -gt 0 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "⚠️ WARNING: Port conflicts detected!"
|
||||||
|
echo "The following ports are already in use on your system:"
|
||||||
|
for conflict in "${conflicts[@]}"; do
|
||||||
|
echo " - $conflict"
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
echo "You may need to:"
|
||||||
|
echo "1. Stop services using these ports, or"
|
||||||
|
echo "2. Edit .env file to use different ports"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "✅ No port conflicts detected!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Function to get instance identifier
|
# Function to get instance identifier
|
||||||
get_instance_identifier() {
|
get_instance_identifier() {
|
||||||
# Try to get from directory name first
|
# Try to get from directory name first
|
||||||
@ -936,14 +903,15 @@ get_instance_identifier() {
|
|||||||
default_instance="$dir_name"
|
default_instance="$dir_name"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
# Send informational messages to stderr so they don't get captured
|
||||||
echo "=== Instance Configuration ==="
|
echo "" >&2
|
||||||
echo "To run multiple Changemaker instances on the same machine,"
|
echo "=== Instance Configuration ===" >&2
|
||||||
echo "each instance needs a unique identifier for containers and networks."
|
echo "To run multiple Changemaker instances on the same machine," >&2
|
||||||
echo ""
|
echo "each instance needs a unique identifier for containers and networks." >&2
|
||||||
|
echo "" >&2
|
||||||
|
|
||||||
if [ -n "$default_instance" ]; then
|
if [ -n "$default_instance" ]; then
|
||||||
echo "Detected potential instance name from directory: $default_instance"
|
echo "Detected potential instance name from directory: $default_instance" >&2
|
||||||
read -p "Use this instance identifier? [Y/n]: " use_detected
|
read -p "Use this instance identifier? [Y/n]: " use_detected
|
||||||
if [[ ! "$use_detected" =~ ^[Nn]$ ]]; then
|
if [[ ! "$use_detected" =~ ^[Nn]$ ]]; then
|
||||||
echo "$default_instance"
|
echo "$default_instance"
|
||||||
@ -965,6 +933,7 @@ get_instance_identifier() {
|
|||||||
instance_id="main"
|
instance_id="main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Only output the final instance_id to stdout (this gets captured)
|
||||||
echo "$instance_id"
|
echo "$instance_id"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -977,6 +946,13 @@ update_docker_compose_names() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if docker-compose.yml exists and is not empty
|
||||||
|
if [ ! -f "$DOCKER_COMPOSE_FILE" ] || [ ! -s "$DOCKER_COMPOSE_FILE" ]; then
|
||||||
|
echo "Error: docker-compose.yml does not exist or is empty at: $DOCKER_COMPOSE_FILE"
|
||||||
|
echo "Please ensure docker-compose.yml exists before running this script."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Updating docker-compose.yml with instance identifier: $instance_id"
|
echo "Updating docker-compose.yml with instance identifier: $instance_id"
|
||||||
|
|
||||||
# Create a backup of the docker-compose.yml file
|
# Create a backup of the docker-compose.yml file
|
||||||
@ -988,25 +964,51 @@ update_docker_compose_names() {
|
|||||||
# Create temporary file for modifications
|
# Create temporary file for modifications
|
||||||
local temp_file=$(mktemp)
|
local temp_file=$(mktemp)
|
||||||
|
|
||||||
|
# Verify temp file was created
|
||||||
|
if [ ! -f "$temp_file" ]; then
|
||||||
|
echo "Error: Could not create temporary file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Update container names, network names, and volume names
|
# Update container names, network names, and volume names
|
||||||
sed -e "s/container_name: \([^-]*\)$/container_name: \1-${instance_id}/g" \
|
# Process the file and save to temp file
|
||||||
|
sed \
|
||||||
-e "s/container_name: \([^-]*\)-changemaker$/container_name: \1-changemaker-${instance_id}/g" \
|
-e "s/container_name: \([^-]*\)-changemaker$/container_name: \1-changemaker-${instance_id}/g" \
|
||||||
-e "s/container_name: \([^-]*\)_\([^-]*\)$/container_name: \1_\2_${instance_id}/g" \
|
|
||||||
-e "s/container_name: \([^-]*\)_\([^-]*\)_changemaker$/container_name: \1_\2_changemaker_${instance_id}/g" \
|
-e "s/container_name: \([^-]*\)_\([^-]*\)_changemaker$/container_name: \1_\2_changemaker_${instance_id}/g" \
|
||||||
-e "s/networks:/networks:/g" \
|
-e "s/container_name: \([^-]*\)_\([^-]*\)$/container_name: \1_\2_${instance_id}/g" \
|
||||||
|
-e "s/container_name: \([^-]*\)$/container_name: \1-${instance_id}/g" \
|
||||||
-e "s/changemaker-lite:/changemaker-lite-${instance_id}:/g" \
|
-e "s/changemaker-lite:/changemaker-lite-${instance_id}:/g" \
|
||||||
-e "s/- changemaker-lite$/- changemaker-lite-${instance_id}/g" \
|
-e "s/- changemaker-lite$/- changemaker-lite-${instance_id}/g" \
|
||||||
-e "s/driver: bridge$/driver: bridge/g" \
|
|
||||||
-e "s/volumes:/volumes:/g" \
|
|
||||||
-e "s/listmonk-data:/listmonk-data-${instance_id}:/g" \
|
-e "s/listmonk-data:/listmonk-data-${instance_id}:/g" \
|
||||||
|
-e "s/source: listmonk-data$/source: listmonk-data-${instance_id}/g" \
|
||||||
-e "s/n8n_data:/n8n_data_${instance_id}:/g" \
|
-e "s/n8n_data:/n8n_data_${instance_id}:/g" \
|
||||||
|
-e "s/source: n8n_data$/source: n8n_data_${instance_id}/g" \
|
||||||
-e "s/nc_data:/nc_data_${instance_id}:/g" \
|
-e "s/nc_data:/nc_data_${instance_id}:/g" \
|
||||||
|
-e "s/source: nc_data$/source: nc_data_${instance_id}/g" \
|
||||||
-e "s/db_data:/db_data_${instance_id}:/g" \
|
-e "s/db_data:/db_data_${instance_id}:/g" \
|
||||||
|
-e "s/source: db_data$/source: db_data_${instance_id}/g" \
|
||||||
-e "s/gitea_data:/gitea_data_${instance_id}:/g" \
|
-e "s/gitea_data:/gitea_data_${instance_id}:/g" \
|
||||||
|
-e "s/source: gitea_data$/source: gitea_data_${instance_id}/g" \
|
||||||
-e "s/mysql_data:/mysql_data_${instance_id}:/g" \
|
-e "s/mysql_data:/mysql_data_${instance_id}:/g" \
|
||||||
|
-e "s/source: mysql_data$/source: mysql_data_${instance_id}/g" \
|
||||||
|
-e "s/redis-data:/redis-data-${instance_id}:/g" \
|
||||||
|
-e "s/source: redis-data$/source: redis-data-${instance_id}/g" \
|
||||||
|
-e "s/prometheus-data:/prometheus-data-${instance_id}:/g" \
|
||||||
|
-e "s/source: prometheus-data$/source: prometheus-data-${instance_id}/g" \
|
||||||
|
-e "s/grafana-data:/grafana-data-${instance_id}:/g" \
|
||||||
|
-e "s/source: grafana-data$/source: grafana-data-${instance_id}/g" \
|
||||||
"$DOCKER_COMPOSE_FILE" > "$temp_file"
|
"$DOCKER_COMPOSE_FILE" > "$temp_file"
|
||||||
|
|
||||||
# Replace the original file
|
# Check if temp file has content
|
||||||
|
if [ ! -s "$temp_file" ]; then
|
||||||
|
echo "Error: sed operation produced empty file"
|
||||||
|
echo "Restoring from backup..."
|
||||||
|
cp "$backup_file" "$DOCKER_COMPOSE_FILE"
|
||||||
|
rm -f "$temp_file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace the original file only if temp file has content
|
||||||
mv "$temp_file" "$DOCKER_COMPOSE_FILE"
|
mv "$temp_file" "$DOCKER_COMPOSE_FILE"
|
||||||
|
|
||||||
echo "✅ Updated docker-compose.yml with instance-specific names:"
|
echo "✅ Updated docker-compose.yml with instance-specific names:"
|
||||||
@ -1054,7 +1056,21 @@ echo "Please provide the following information:"
|
|||||||
# Get instance identifier and update docker-compose.yml
|
# Get instance identifier and update docker-compose.yml
|
||||||
echo -e "\n---- Instance Configuration ----"
|
echo -e "\n---- Instance Configuration ----"
|
||||||
instance_identifier=$(get_instance_identifier)
|
instance_identifier=$(get_instance_identifier)
|
||||||
update_docker_compose_names "$instance_identifier"
|
# Strip any whitespace/newlines from the captured value
|
||||||
|
instance_identifier=$(echo "$instance_identifier" | tr -d '\n\r' | xargs)
|
||||||
|
|
||||||
|
# Only update docker-compose.yml if we have a non-default instance ID
|
||||||
|
if [ -n "$instance_identifier" ] && [ "$instance_identifier" != "main" ]; then
|
||||||
|
if update_docker_compose_names "$instance_identifier"; then
|
||||||
|
echo "✅ Docker Compose configuration updated successfully"
|
||||||
|
else
|
||||||
|
echo "⚠️ Warning: Failed to update docker-compose.yml"
|
||||||
|
echo " Continuing with default configuration..."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Using default instance configuration (no modifications to docker-compose.yml)"
|
||||||
|
fi
|
||||||
|
|
||||||
update_env_instance_config "$instance_identifier"
|
update_env_instance_config "$instance_identifier"
|
||||||
|
|
||||||
# Domain configuration
|
# Domain configuration
|
||||||
|
|||||||
@ -21,16 +21,16 @@ services:
|
|||||||
- "${CODE_SERVER_PORT:-8888}:8080"
|
- "${CODE_SERVER_PORT:-8888}:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
listmonk-app:
|
listmonk-app:
|
||||||
image: listmonk/listmonk:latest
|
image: listmonk/listmonk:latest
|
||||||
container_name: listmonk_app
|
container_name: listmonk_app_test4-test4
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${LISTMONK_PORT:-9001}:9000"
|
- "${LISTMONK_PORT:-9001}:9000"
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
hostname: ${LISTMONK_HOSTNAME}
|
hostname: ${LISTMONK_HOSTNAME}
|
||||||
depends_on:
|
depends_on:
|
||||||
- listmonk-db
|
- listmonk-db
|
||||||
@ -54,12 +54,12 @@ services:
|
|||||||
|
|
||||||
listmonk-db:
|
listmonk-db:
|
||||||
image: postgres:17-alpine
|
image: postgres:17-alpine
|
||||||
container_name: listmonk_db
|
container_name: listmonk_db_test4-test4
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${LISTMONK_DB_PORT:-5432}:5432"
|
- "127.0.0.1:${LISTMONK_DB_PORT:-5432}:5432"
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
environment:
|
environment:
|
||||||
<<: *db-credentials
|
<<: *db-credentials
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -69,12 +69,12 @@ services:
|
|||||||
retries: 6
|
retries: 6
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- type: volume
|
||||||
source: listmonk-data
|
source: listmonk-data-test4
|
||||||
target: /var/lib/postgresql/data
|
target: /var/lib/postgresql/data
|
||||||
|
|
||||||
mkdocs:
|
mkdocs:
|
||||||
image: squidfunk/mkdocs-material
|
image: squidfunk/mkdocs-material
|
||||||
container_name: mkdocs-changemaker
|
container_name: mkdocs-changemaker-test4
|
||||||
volumes:
|
volumes:
|
||||||
- ./mkdocs:/docs:rw
|
- ./mkdocs:/docs:rw
|
||||||
- ./assets/images:/docs/assets/images:rw
|
- ./assets/images:/docs/assets/images:rw
|
||||||
@ -85,7 +85,7 @@ services:
|
|||||||
- SITE_URL=${BASE_DOMAIN:-https://changeme.org}
|
- SITE_URL=${BASE_DOMAIN:-https://changeme.org}
|
||||||
command: serve --dev-addr=0.0.0.0:8000 --watch-theme --livereload
|
command: serve --dev-addr=0.0.0.0:8000 --watch-theme --livereload
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
mkdocs-site-server:
|
mkdocs-site-server:
|
||||||
@ -102,11 +102,11 @@ services:
|
|||||||
- "${MKDOCS_SITE_SERVER_PORT:-4001}:80"
|
- "${MKDOCS_SITE_SERVER_PORT:-4001}:80"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
n8n:
|
n8n:
|
||||||
image: docker.n8n.io/n8nio/n8n
|
image: docker.n8n.io/n8nio/n8n
|
||||||
container_name: n8n-changemaker
|
container_name: n8n-changemaker-test4
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "${N8N_PORT:-5678}:5678"
|
- "${N8N_PORT:-5678}:5678"
|
||||||
@ -122,10 +122,10 @@ services:
|
|||||||
- N8N_DEFAULT_USER_EMAIL=${N8N_USER_EMAIL:-admin@example.com}
|
- N8N_DEFAULT_USER_EMAIL=${N8N_USER_EMAIL:-admin@example.com}
|
||||||
- N8N_DEFAULT_USER_PASSWORD=${N8N_USER_PASSWORD:-changeMe}
|
- N8N_DEFAULT_USER_PASSWORD=${N8N_USER_PASSWORD:-changeMe}
|
||||||
volumes:
|
volumes:
|
||||||
- n8n_data:/home/node/.n8n
|
- n8n_data_test4:/home/node/.n8n
|
||||||
- ./local-files:/files
|
- ./local-files:/files
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
nocodb:
|
nocodb:
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -138,9 +138,9 @@ services:
|
|||||||
- "${NOCODB_PORT:-8090}:8080"
|
- "${NOCODB_PORT:-8090}:8080"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- "nc_data:/usr/app/data"
|
- "nc_data_test4:/usr/app/data"
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
root_db:
|
root_db:
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: root_db
|
POSTGRES_DB: root_db
|
||||||
@ -154,14 +154,14 @@ services:
|
|||||||
image: postgres:16.6
|
image: postgres:16.6
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- "db_data:/var/lib/postgresql/data"
|
- "db_data_test4:/var/lib/postgresql/data"
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
# Homepage App
|
# Homepage App
|
||||||
homepage-changemaker:
|
homepage-changemaker:
|
||||||
image: ghcr.io/gethomepage/homepage:latest
|
image: ghcr.io/gethomepage/homepage:latest
|
||||||
container_name: homepage-changemaker
|
container_name: homepage-changemaker-test4
|
||||||
ports:
|
ports:
|
||||||
- "${HOMEPAGE_PORT:-3010}:3000"
|
- "${HOMEPAGE_PORT:-3010}:3000"
|
||||||
volumes:
|
volumes:
|
||||||
@ -177,12 +177,12 @@ services:
|
|||||||
- HOMEPAGE_VAR_BASE_URL=${HOMEPAGE_VAR_BASE_URL:-http://localhost}
|
- HOMEPAGE_VAR_BASE_URL=${HOMEPAGE_VAR_BASE_URL:-http://localhost}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
# Gitea - Git service
|
# Gitea - Git service
|
||||||
gitea-app:
|
gitea-app:
|
||||||
image: gitea/gitea:1.23.7
|
image: gitea/gitea:1.23.7
|
||||||
container_name: gitea_changemaker
|
container_name: gitea_changemaker_test4-test4
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=${USER_ID:-1000}
|
- USER_UID=${USER_ID:-1000}
|
||||||
- USER_GID=${GROUP_ID:-1000}
|
- USER_GID=${GROUP_ID:-1000}
|
||||||
@ -201,9 +201,9 @@ services:
|
|||||||
- GITEA__server__PROXY_ALLOW_SUBNET=0.0.0.0/0
|
- GITEA__server__PROXY_ALLOW_SUBNET=0.0.0.0/0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
volumes:
|
volumes:
|
||||||
- gitea_data:/data
|
- gitea_data_test4:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
@ -214,7 +214,7 @@ services:
|
|||||||
|
|
||||||
gitea-db:
|
gitea-db:
|
||||||
image: mysql:8
|
image: mysql:8
|
||||||
container_name: gitea_mysql_changemaker
|
container_name: gitea_mysql_changemaker_test4_test4-test4
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${GITEA_DB_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${GITEA_DB_ROOT_PASSWORD}
|
||||||
@ -222,9 +222,9 @@ services:
|
|||||||
- MYSQL_PASSWORD=${GITEA_DB_PASSWD}
|
- MYSQL_PASSWORD=${GITEA_DB_PASSWD}
|
||||||
- MYSQL_DATABASE=${GITEA_DB_NAME:-gitea}
|
- MYSQL_DATABASE=${GITEA_DB_NAME:-gitea}
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data_test4:/var/lib/mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${GITEA_DB_USER:-gitea}", "-p${GITEA_DB_PASSWD}"]
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${GITEA_DB_USER:-gitea}", "-p${GITEA_DB_PASSWD}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -238,17 +238,17 @@ services:
|
|||||||
- "${MINI_QR_PORT:-8089}:8080"
|
- "${MINI_QR_PORT:-8089}:8080"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
|
|
||||||
# Shared Redis - Used by all services for caching, queues, sessions
|
# Shared Redis - Used by all services for caching, queues, sessions
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
container_name: redis-changemaker
|
container_name: redis-changemaker-test4
|
||||||
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
|
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
volumes:
|
volumes:
|
||||||
- redis-data:/data
|
- redis-data-test4:/data
|
||||||
restart: always
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
@ -264,7 +264,7 @@ services:
|
|||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 256M
|
memory: 256M
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
@ -274,7 +274,7 @@ services:
|
|||||||
# Prometheus - Metrics collection for all services
|
# Prometheus - Metrics collection for all services
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:latest
|
||||||
container_name: prometheus-changemaker
|
container_name: prometheus-changemaker-test4
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
- '--storage.tsdb.path=/prometheus'
|
- '--storage.tsdb.path=/prometheus'
|
||||||
@ -283,17 +283,17 @@ services:
|
|||||||
- "${PROMETHEUS_PORT:-9090}:9090"
|
- "${PROMETHEUS_PORT:-9090}:9090"
|
||||||
volumes:
|
volumes:
|
||||||
- ./configs/prometheus:/etc/prometheus
|
- ./configs/prometheus:/etc/prometheus
|
||||||
- prometheus-data:/prometheus
|
- prometheus-data-test4:/prometheus
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
profiles:
|
profiles:
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|
||||||
# Grafana - Metrics visualization for all services
|
# Grafana - Metrics visualization for all services
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
container_name: grafana-changemaker
|
container_name: grafana-changemaker-test4
|
||||||
ports:
|
ports:
|
||||||
- "${GRAFANA_PORT:-3001}:3000"
|
- "${GRAFANA_PORT:-3001}:3000"
|
||||||
environment:
|
environment:
|
||||||
@ -301,13 +301,13 @@ services:
|
|||||||
- GF_USERS_ALLOW_SIGN_UP=false
|
- GF_USERS_ALLOW_SIGN_UP=false
|
||||||
- GF_SERVER_ROOT_URL=${GRAFANA_ROOT_URL:-http://localhost:3001}
|
- GF_SERVER_ROOT_URL=${GRAFANA_ROOT_URL:-http://localhost:3001}
|
||||||
volumes:
|
volumes:
|
||||||
- grafana-data:/var/lib/grafana
|
- grafana-data-test4:/var/lib/grafana
|
||||||
- ./configs/grafana:/etc/grafana/provisioning
|
- ./configs/grafana:/etc/grafana/provisioning
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
profiles:
|
profiles:
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|
||||||
@ -317,13 +317,13 @@ services:
|
|||||||
# SMTP: mailhog-changemaker:1025
|
# SMTP: mailhog-changemaker:1025
|
||||||
mailhog:
|
mailhog:
|
||||||
image: mailhog/mailhog:latest
|
image: mailhog/mailhog:latest
|
||||||
container_name: mailhog-changemaker
|
container_name: mailhog-changemaker-test4
|
||||||
ports:
|
ports:
|
||||||
- "1025:1025" # SMTP server
|
- "1025:1025" # SMTP server
|
||||||
- "8025:8025" # Web UI
|
- "8025:8025" # Web UI
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- changemaker-lite
|
- changemaker-lite-test4
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
@ -331,16 +331,16 @@ services:
|
|||||||
max-file: "2"
|
max-file: "2"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
changemaker-lite:
|
changemaker-lite-test4:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
listmonk-data:
|
listmonk-data-test4:
|
||||||
n8n_data:
|
n8n_data_test4:
|
||||||
nc_data:
|
nc_data_test4:
|
||||||
db_data:
|
db_data_test4:
|
||||||
gitea_data:
|
gitea_data_test4:
|
||||||
mysql_data:
|
mysql_data_test4:
|
||||||
redis-data:
|
redis-data-test4:
|
||||||
prometheus-data:
|
prometheus-data-test4:
|
||||||
grafana-data:
|
grafana-data-test4:
|
||||||
0
reset-site.sh
Normal file → Executable file
0
reset-site.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user