feat: initialize project with core configuration files and Docker setup
This commit is contained in:
57
docker-compose.yml
Normal file
57
docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
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
|
||||
- bot-data:/app/config/projects.json # Données persistantes du bot
|
||||
|
||||
# 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
|
||||
volumes:
|
||||
bot-data:
|
||||
driver: local
|
||||
|
||||
# Réseau dédié
|
||||
networks:
|
||||
gitlab-issue-discord-bot-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user