freealberta/influence/docker-compose.yml
admin e5c32ad25a Add health check utility, logger, metrics, backup, and SMTP toggle scripts
- Implemented a comprehensive health check utility to monitor system dependencies including NocoDB, SMTP, Represent API, disk space, and memory usage.
- Created a logger utility using Winston for structured logging with daily rotation and various log levels.
- Developed a metrics utility using Prometheus client to track application performance metrics such as email sends, HTTP requests, and user activity.
- Added a backup script for automated backups of NocoDB data, uploaded files, and environment configurations with optional S3 support.
- Introduced a toggle script to switch between development (MailHog) and production (ProtonMail) SMTP configurations.
2025-10-23 11:33:00 -06:00

54 lines
1.1 KiB
YAML

version: '3.8'
services:
app:
build:
context: ./app
dockerfile: Dockerfile
container_name: influence-app
ports:
- "3333:3333"
env_file:
- .env
environment:
- NODE_ENV=production
- REDIS_HOST=redis-changemaker
- REDIS_PORT=6379
volumes:
- ./app:/usr/src/app
- /usr/src/app/node_modules
- uploads-data:/usr/src/app/public/uploads
- logs-data:/usr/src/app/logs
restart: always
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3333/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
networks:
- changemakerlite_changemaker-lite
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
uploads-data:
driver: local
logs-data:
driver: local
networks:
changemakerlite_changemaker-lite:
external: true