Files
TelegramMemeVault/docker-compose.yml
T

136 lines
3.9 KiB
YAML
Raw Normal View History

2026-09-28 01:47:01 +04:00
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
2026-10-07 02:17:30 +04:00
minio:
image: pgsty/silo:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-memevault}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:?err}
# Rewrite presigned URLs to this public base URL so browsers can reach them.
MINIO_SERVER_URL: ${MINIO_PUBLIC_URL:-http://localhost:9000}
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
retries: 10
minio-init:
image: pgsty/silo:latest
depends_on:
minio:
condition: service_healthy
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-memevault}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?err}
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 $$MINIO_ACCESS_KEY $$MINIO_SECRET_KEY &&
mc mb --ignore-existing local/memevault &&
echo 'Bucket ready.'
"
restart: "no"
2026-09-28 01:47:01 +04:00
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
2026-10-07 02:17:30 +04:00
minio:
condition: service_healthy
minio-init:
condition: service_completed_successfully
2026-09-28 01:47:01 +04:00
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
2026-09-28 02:02:05 +04:00
Telegram__BotToken: ${TELEGRAM_BOT_TOKEN:?err}
2026-10-07 02:17:30 +04:00
Telegram__ApiBaseUrl: ${TELEGRAM_API_BASE_URL:-https://api.telegram.org}
2026-09-28 02:02:05 +04:00
Jwt__SecretKey: ${JWT_SECRET_KEY:?err}
Jwt__ExpiryHours: 24
2026-10-07 02:17:30 +04:00
S3__ServiceUrl: ${MINIO_PUBLIC_URL:-http://localhost:9000}
S3__AccessKey: ${MINIO_ACCESS_KEY:-memevault}
S3__SecretKey: ${MINIO_SECRET_KEY:?err}
S3__BucketName: memevault
2026-09-28 01:47:01 +04:00
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
2026-10-07 02:17:30 +04:00
Telegram__BotToken: ${TELEGRAM_BOT_TOKEN:?err}
Telegram__ApiBaseUrl: ${TELEGRAM_API_BASE_URL:-https://api.telegram.org}
2026-09-28 01:47:01 +04:00
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"
2026-10-07 02:17:30 +04:00
miniapp:
build: ./miniapp
ports:
- "3000:80"
depends_on:
- api
2026-09-28 01:47:01 +04:00
volumes:
postgres-data:
2026-10-07 02:17:30 +04:00
minio-data:
2026-09-28 01:47:01 +04:00
prometheus-data: