Initial commit
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_DB: memevault
|
||||
POSTGRES_USER: memevault
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U memevault"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
migrator:
|
||||
build: .
|
||||
command: ["dotnet", "/app/migrator/MemeVault.Migrator.dll"]
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
ConnectionStrings__Postgres: Host=postgres;Database=memevault;Username=memevault;Password=${POSTGRES_PASSWORD}
|
||||
restart: "no"
|
||||
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
migrator:
|
||||
condition: service_completed_successfully
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
ConnectionStrings__Postgres: Host=postgres;Database=memevault;Username=memevault;Password=${POSTGRES_PASSWORD}
|
||||
ConnectionStrings__Redis: redis:6379
|
||||
|
||||
bot:
|
||||
build: .
|
||||
command: ["dotnet", "/app/bot/MemeVault.Bot.dll"]
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
migrator:
|
||||
condition: service_completed_successfully
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:8081
|
||||
ConnectionStrings__Postgres: Host=postgres;Database=memevault;Username=memevault;Password=${POSTGRES_PASSWORD}
|
||||
ConnectionStrings__Redis: redis:6379
|
||||
Bot__Token: ${TELEGRAM_BOT_TOKEN:?err}
|
||||
Bot__Mode: ${TELEGRAM_MODE:-Polling}
|
||||
# Bot__WebhookHost: https://your-domain.com # только для Webhook-режима
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.3.1
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus-data:/prometheus
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.retention.time=7d"
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
prometheus-data:
|
||||
Reference in New Issue
Block a user