Enhance Docker setup and user notification features
- Updated docker-compose.yml to include environment variables and health checks for the app service. - Modified Dockerfile to install curl for health checks and adjusted the build process for backend services. - Improved user notification handling in activation, blocking, and config revocation commands by integrating Telegram notifications. - Added new test cases to validate the updated command handlers and Telegram notifier functionality. - Enhanced documentation to reflect the new Telegram bot features and user management improvements.
This commit is contained in:
@@ -21,13 +21,29 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
# Секреты (Jwt__SigningKey, AdminSeed__Password, Telegram__BotToken, ...) — из .env,
|
||||
# см. .env.example. ConnectionStrings__Default ниже переопределяет .env: адрес БД внутри
|
||||
# сети compose всегда 'db', не значение из .env (которое рассчитано на локальный запуск).
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Production
|
||||
ASPNETCORE_HTTP_PORTS: '8080'
|
||||
ConnectionStrings__Default: 'Host=db;Port=5432;Database=${POSTGRES_DB:-pnvpanel};Username=${POSTGRES_USER:-pnvpanel};Password=${POSTGRES_PASSWORD:-pnvpanel}'
|
||||
volumes:
|
||||
# Data Protection key-ring (шифрование секретов нод at-rest) должен пережить пересоздание
|
||||
# контейнера — иначе расшифровка паролей нод после рестарта станет невозможна.
|
||||
- dp_keys:/app/keys
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
start_period: 20s
|
||||
retries: 5
|
||||
ports:
|
||||
- '8080:8080'
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
dp_keys:
|
||||
|
||||
Reference in New Issue
Block a user