This commit adds comprehensive email testing support and improves the Homepage dashboard configuration logic: MailHog Email Testing: - Add MailHog service with configurable SMTP and Web UI ports - Configure MailHog ports in config.sh with defaults (1025 SMTP, 8025 Web) - Add port conflict checking for MailHog ports - Use environment variables for MailHog ports in docker-compose.yml Enhanced Homepage Configuration: - Improve update_services_yaml() function to handle Production and Local tabs separately - Add local IP address configuration prompt for Homepage Local tab - Support custom local network IPs (e.g., Tailscale) for local service access - Add comprehensive port-based URL mappings for all services in Local tab - Include MailHog in both Production and Local service mappings Configuration Improvements: - Add local_ip parameter to update_services_yaml function - Display MailHog information in port summary and next steps - Update completion message with Homepage Local tab configuration info These changes enable developers to test email functionality locally and provide better support for accessing services via local network IPs.
442 lines
12 KiB
YAML
442 lines
12 KiB
YAML
x-db-credentials: &db-credentials
|
|
POSTGRES_USER: &db-user ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: &db-password ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: &db-name ${POSTGRES_DB}
|
|
|
|
services:
|
|
code-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.code-server
|
|
container_name: code-server-changemaker
|
|
environment:
|
|
- DOCKER_USER=${USER_NAME:-coder}
|
|
- DEFAULT_WORKSPACE=/home/coder/mkdocs/
|
|
user: "${USER_ID:-1000}:${GROUP_ID:-1000}"
|
|
volumes:
|
|
- ./configs/code-server/.config:/home/coder/.config
|
|
- ./configs/code-server/.local:/home/coder/.local
|
|
- ./mkdocs:/home/coder/mkdocs/
|
|
ports:
|
|
- "${CODE_SERVER_PORT:-8888}:8080"
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
listmonk-app:
|
|
image: listmonk/listmonk:latest
|
|
container_name: listmonk_app_test4
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${LISTMONK_PORT:-9001}:9000"
|
|
networks:
|
|
- changemaker-lite
|
|
hostname: ${LISTMONK_HOSTNAME}
|
|
depends_on:
|
|
- listmonk-db
|
|
command: [sh, -c, "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"]
|
|
environment:
|
|
LISTMONK_app__address: 0.0.0.0:9000
|
|
LISTMONK_db__user: *db-user
|
|
LISTMONK_db__password: *db-password
|
|
LISTMONK_db__database: *db-name
|
|
LISTMONK_db__host: listmonk-db
|
|
LISTMONK_db__port: ${LISTMONK_DB_PORT:-5432}
|
|
LISTMONK_db__ssl_mode: disable
|
|
LISTMONK_db__max_open: ${LISTMONK_DB_MAX_OPEN:-25}
|
|
LISTMONK_db__max_idle: ${LISTMONK_DB_MAX_IDLE:-25}
|
|
LISTMONK_db__max_lifetime: ${LISTMONK_DB_MAX_LIFETIME:-300s}
|
|
TZ: Etc/UTC
|
|
LISTMONK_ADMIN_USER: ${LISTMONK_ADMIN_USER:-}
|
|
LISTMONK_ADMIN_PASSWORD: ${LISTMONK_ADMIN_PASSWORD:-}
|
|
volumes:
|
|
- ./assets/uploads:/listmonk/uploads:rw
|
|
|
|
listmonk-db:
|
|
image: postgres:17-alpine
|
|
container_name: listmonk_db_test4
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:${LISTMONK_DB_PORT:-5432}:5432"
|
|
networks:
|
|
- changemaker-lite
|
|
environment:
|
|
<<: *db-credentials
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 6
|
|
volumes:
|
|
- type: volume
|
|
source: listmonk-data
|
|
target: /var/lib/postgresql/data
|
|
|
|
mkdocs:
|
|
image: squidfunk/mkdocs-material
|
|
container_name: mkdocs-changemaker
|
|
volumes:
|
|
- ./mkdocs:/docs:rw
|
|
- ./assets/images:/docs/assets/images:rw
|
|
user: "${USER_ID:-1000}:${GROUP_ID:-1000}"
|
|
ports:
|
|
- "${MKDOCS_PORT:-4000}:8000"
|
|
environment:
|
|
- SITE_URL=${BASE_DOMAIN:-https://changeme.org}
|
|
command: serve --dev-addr=0.0.0.0:8000 --watch-theme --livereload
|
|
networks:
|
|
- changemaker-lite
|
|
restart: unless-stopped
|
|
|
|
mkdocs-site-server:
|
|
image: lscr.io/linuxserver/nginx:latest
|
|
container_name: mkdocs-site-server-changemaker
|
|
environment:
|
|
- PUID=${USER_ID:-1000}
|
|
- PGID=${GROUP_ID:-1000}
|
|
- TZ=Etc/UTC
|
|
volumes:
|
|
- ./mkdocs/site:/config/www
|
|
- ./configs/mkdocs-site/default.conf:/config/nginx/site-confs/default.conf # Add this line
|
|
ports:
|
|
- "${MKDOCS_SITE_SERVER_PORT:-4001}:80"
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
n8n:
|
|
image: docker.n8n.io/n8nio/n8n
|
|
container_name: n8n-changemaker
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${N8N_PORT:-5678}:5678"
|
|
environment:
|
|
- N8N_HOST=${N8N_HOST:-n8n.${DOMAIN}}
|
|
- N8N_PORT=5678
|
|
- N8N_PROTOCOL=https
|
|
- NODE_ENV=production
|
|
- WEBHOOK_URL=https://${N8N_HOST:-n8n.${DOMAIN}}/
|
|
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-UTC}
|
|
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY:-changeMe}
|
|
- N8N_USER_MANAGEMENT_DISABLED=false
|
|
- N8N_DEFAULT_USER_EMAIL=${N8N_USER_EMAIL:-admin@example.com}
|
|
- N8N_DEFAULT_USER_PASSWORD=${N8N_USER_PASSWORD:-changeMe}
|
|
volumes:
|
|
- n8n_data_test4:/home/node/.n8n
|
|
- ./local-files:/files
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
nocodb:
|
|
depends_on:
|
|
root_db:
|
|
condition: service_healthy
|
|
environment:
|
|
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
|
|
image: "nocodb/nocodb:latest"
|
|
ports:
|
|
- "${NOCODB_PORT:-8090}:8080"
|
|
restart: always
|
|
volumes:
|
|
- "nc_data_test4:/usr/app/data"
|
|
networks:
|
|
- changemaker-lite
|
|
root_db:
|
|
environment:
|
|
POSTGRES_DB: root_db
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_USER: postgres
|
|
healthcheck:
|
|
interval: 10s
|
|
retries: 10
|
|
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
|
|
timeout: 2s
|
|
image: postgres:16.6
|
|
restart: always
|
|
volumes:
|
|
- "db_data_test4:/var/lib/postgresql/data"
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
# Homepage App
|
|
homepage-changemaker:
|
|
image: ghcr.io/gethomepage/homepage:latest
|
|
container_name: homepage-changemaker
|
|
ports:
|
|
- "${HOMEPAGE_PORT:-3010}:3000"
|
|
volumes:
|
|
- ./configs/homepage:/app/config
|
|
- ./assets/icons:/app/public/icons
|
|
- ./assets/images:/app/public/images
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
environment:
|
|
- PUID=${USER_ID:-1000}
|
|
- PGID=${DOCKER_GROUP_ID:-984}
|
|
- TZ=Etc/UTC
|
|
- HOMEPAGE_ALLOWED_HOSTS=*
|
|
- HOMEPAGE_VAR_BASE_URL=${HOMEPAGE_VAR_BASE_URL:-http://localhost}
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
# Gitea - Git service
|
|
gitea-app:
|
|
image: gitea/gitea:1.23.7
|
|
container_name: gitea_changemaker_test4
|
|
environment:
|
|
- USER_UID=${USER_ID:-1000}
|
|
- USER_GID=${GROUP_ID:-1000}
|
|
- GITEA__database__DB_TYPE=${GITEA_DB_TYPE:-mysql}
|
|
- GITEA__database__HOST=${GITEA_DB_HOST:-gitea-db:3306}
|
|
- GITEA__database__NAME=${GITEA_DB_NAME:-gitea}
|
|
- GITEA__database__USER=${GITEA_DB_USER:-gitea}
|
|
- GITEA__database__PASSWD=${GITEA_DB_PASSWD}
|
|
- GITEA__server__ROOT_URL=${GITEA_ROOT_URL}
|
|
- GITEA__server__HTTP_PORT=3000
|
|
- GITEA__server__PROTOCOL=http
|
|
- GITEA__server__DOMAIN=${GITEA_DOMAIN}
|
|
- GITEA__server__ENABLE_GZIP=true
|
|
- GITEA__server__PROXY_PROTOCOL=true
|
|
- GITEA__server__PROXY_PROXY_PROTOCOL_TLS=true
|
|
- GITEA__server__PROXY_ALLOW_SUBNET=0.0.0.0/0
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
volumes:
|
|
- gitea_data_test4:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "${GITEA_WEB_PORT:-3030}:3000"
|
|
- "${GITEA_SSH_PORT:-2222}:22"
|
|
depends_on:
|
|
- gitea-db
|
|
|
|
gitea-db:
|
|
image: mysql:8
|
|
container_name: gitea_mysql_changemaker_test4_test4
|
|
restart: unless-stopped
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=${GITEA_DB_ROOT_PASSWORD}
|
|
- MYSQL_USER=${GITEA_DB_USER:-gitea}
|
|
- MYSQL_PASSWORD=${GITEA_DB_PASSWD}
|
|
- MYSQL_DATABASE=${GITEA_DB_NAME:-gitea}
|
|
networks:
|
|
- changemaker-lite
|
|
volumes:
|
|
- mysql_data_test4:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${GITEA_DB_USER:-gitea}", "-p${GITEA_DB_PASSWD}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
mini-qr:
|
|
image: ghcr.io/lyqht/mini-qr:latest
|
|
container_name: mini-qr
|
|
ports:
|
|
- "${MINI_QR_PORT:-8089}:8080"
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
|
|
# Shared Redis - Used by all services for caching, queues, sessions
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: redis-changemaker
|
|
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 256M
|
|
networks:
|
|
- changemaker-lite
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "5m"
|
|
max-file: "2"
|
|
|
|
# Prometheus - Metrics collection for all services
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: prometheus-changemaker
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--storage.tsdb.retention.time=30d'
|
|
ports:
|
|
- "${PROMETHEUS_PORT:-9090}:9090"
|
|
volumes:
|
|
- ./configs/prometheus:/etc/prometheus
|
|
- prometheus-data:/prometheus
|
|
restart: always
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Grafana - Metrics visualization for all services
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: grafana-changemaker
|
|
ports:
|
|
- "${GRAFANA_PORT:-3001}:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- GF_SERVER_ROOT_URL=${GRAFANA_ROOT_URL:-http://localhost:3001}
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./configs/grafana:/etc/grafana/provisioning
|
|
restart: always
|
|
depends_on:
|
|
- prometheus
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# cAdvisor - Container metrics exporter for Docker
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:latest
|
|
container_name: cadvisor-changemaker
|
|
ports:
|
|
- "${CADVISOR_PORT:-8080}:8080"
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:ro
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
- /dev/disk/:/dev/disk:ro
|
|
privileged: true
|
|
devices:
|
|
- /dev/kmsg
|
|
restart: always
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Node Exporter - System metrics exporter
|
|
node-exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: node-exporter-changemaker
|
|
ports:
|
|
- "${NODE_EXPORTER_PORT:-9100}:9100"
|
|
command:
|
|
- '--path.rootfs=/host'
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
restart: always
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Redis Exporter - Redis metrics exporter
|
|
redis-exporter:
|
|
image: oliver006/redis_exporter:latest
|
|
container_name: redis-exporter-changemaker
|
|
ports:
|
|
- "${REDIS_EXPORTER_PORT:-9121}:9121"
|
|
environment:
|
|
- REDIS_ADDR=redis:6379
|
|
restart: always
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Alertmanager - Alert routing and notification
|
|
alertmanager:
|
|
image: prom/alertmanager:latest
|
|
container_name: alertmanager-changemaker
|
|
ports:
|
|
- "${ALERTMANAGER_PORT:-9093}:9093"
|
|
volumes:
|
|
- ./configs/alertmanager:/etc/alertmanager
|
|
- alertmanager-data:/alertmanager
|
|
command:
|
|
- '--config.file=/etc/alertmanager/alertmanager.yml'
|
|
- '--storage.path=/alertmanager'
|
|
restart: always
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Gotify - Self-hosted push notification service
|
|
gotify:
|
|
image: gotify/server:latest
|
|
container_name: gotify-changemaker
|
|
ports:
|
|
- "${GOTIFY_PORT:-8889}:80"
|
|
environment:
|
|
- GOTIFY_DEFAULTUSER_NAME=${GOTIFY_ADMIN_USER:-admin}
|
|
- GOTIFY_DEFAULTUSER_PASS=${GOTIFY_ADMIN_PASSWORD:-admin}
|
|
- TZ=Etc/UTC
|
|
volumes:
|
|
- gotify-data:/app/data
|
|
restart: always
|
|
networks:
|
|
- changemaker-lite
|
|
profiles:
|
|
- monitoring
|
|
|
|
# MailHog - Shared email testing service for all applications
|
|
# Captures all emails sent by any service for development/testing
|
|
# Web UI: http://localhost:8025
|
|
# SMTP: mailhog-changemaker:1025
|
|
mailhog:
|
|
image: mailhog/mailhog:latest
|
|
container_name: mailhog-changemaker
|
|
ports:
|
|
- "${MAILHOG_SMTP_PORT:-1025}:1025" # SMTP server
|
|
- "${MAILHOG_WEB_PORT:-8025}:8025" # Web UI
|
|
restart: unless-stopped
|
|
networks:
|
|
- changemaker-lite
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "5m"
|
|
max-file: "2"
|
|
|
|
networks:
|
|
changemaker-lite:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
listmonk-data:
|
|
n8n_data_test4:
|
|
nc_data_test4:
|
|
db_data_test4:
|
|
gitea_data_test4:
|
|
mysql_data_test4:
|
|
redis-data:
|
|
prometheus-data:
|
|
grafana-data:
|
|
alertmanager-data:
|
|
gotify-data: |