55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
gitlab-issue-discord-bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: gitlab-issue-discord-bot
|
|
restart: unless-stopped
|
|
|
|
# Variables d'environnement
|
|
environment:
|
|
- NODE_ENV=production
|
|
- LOG_LEVEL=info
|
|
|
|
- DISCORD_TOKEN=${DISCORD_TOKEN:-}
|
|
- DISCORD_GUILD_ID=${DISCORD_GUILD_ID:-}
|
|
- GITLAB_URL=${GITLAB_URL:-}
|
|
- GITLAB_TOKEN=${GITLAB_TOKEN:-}
|
|
- SYNC_INTERVAL_MINUTES=${SYNC_INTERVAL_MINUTES:-5}
|
|
|
|
# Volumes pour la configuration
|
|
volumes:
|
|
- ./config/projects.json:/app/config/projects.json:ro # Fichier projects.json en lecture seule
|
|
|
|
# Réseau
|
|
networks:
|
|
- gitlab-issue-discord-bot-network
|
|
|
|
# Surveillance de santé
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "process.exit(0)"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Limites de ressources
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 256M
|
|
cpus: '0.25'
|
|
|
|
# Volumes nommés
|
|
# Aucun volume persistant nécessaire
|
|
|
|
# Réseau dédié
|
|
networks:
|
|
gitlab-issue-discord-bot-network:
|
|
driver: bridge
|