Complete implementation ready for Coolify: - Node.js 22 + Fastify + socket.io backend - PostgreSQL 16 + Redis 7 services - Docker Compose configuration - Deployment scripts and documentation Co-Authored-By: Paperclip <noreply@paperclip.ing>
86 lines
2 KiB
YAML
86 lines
2 KiB
YAML
services:
|
|
app:
|
|
image: registry.barodine.net/agenthub:${TAG:-latest}
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL}
|
|
REDIS_URL: ${REDIS_URL}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
LOG_LEVEL: info
|
|
PORT: 3000
|
|
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
ports:
|
|
- '3000:3000'
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: agenthub
|
|
POSTGRES_USER: agenthub
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: ['redis-server', '--save', '60', '100', '--appendonly', 'yes']
|
|
volumes:
|
|
- redisdata:/data
|
|
restart: unless-stopped
|
|
|
|
ofelia:
|
|
image: mcuadros/ofelia:latest
|
|
depends_on:
|
|
- postgres
|
|
command: daemon --docker
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
labels:
|
|
ofelia.enabled: 'true'
|
|
restart: unless-stopped
|
|
|
|
backup:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backup
|
|
environment:
|
|
PGHOST: postgres
|
|
PGPORT: 5432
|
|
PGDATABASE: agenthub
|
|
PGUSER: agenthub
|
|
PGPASSWORD: ${POSTGRES_PASSWORD}
|
|
BACKUP_DIR: /backups
|
|
RETENTION_DAYS: 14
|
|
S3_ENDPOINT: ${S3_ENDPOINT:-}
|
|
S3_BUCKET: ${S3_BUCKET:-}
|
|
GPG_RECIPIENT_KEY: ${GPG_RECIPIENT_KEY:-}
|
|
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
|
|
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
|
|
volumes:
|
|
- /opt/agenthub/backups:/backups
|
|
labels:
|
|
ofelia.enabled: 'true'
|
|
ofelia.job-exec.backup-daily.schedule: '0 0 3 * * *'
|
|
ofelia.job-exec.backup-daily.command: '/usr/local/bin/backup.sh'
|
|
depends_on:
|
|
- postgres
|
|
restart: 'no'
|
|
|
|
uptime-kuma:
|
|
image: louislam/uptime-kuma:1
|
|
environment:
|
|
UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN: 0
|
|
volumes:
|
|
- uptime-kuma-data:/app/data
|
|
ports:
|
|
- '3001:3001'
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
redisdata:
|
|
uptime-kuma-data:
|