generated from VLADIMIR/template
add rustfs
This commit is contained in:
+49
-8
@@ -13,28 +13,69 @@ services:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/evening_detective_server?sslmode=disable"
|
||||
SMTP_HOST: mail.crabs-games.art
|
||||
SMTP_PORT: 465
|
||||
SMTP_USER: evening_detective@crabs-games.art
|
||||
SMTP_PASSWORD: your_password
|
||||
JWT_SECRET: your_secret
|
||||
depends_on:
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
postgres:
|
||||
# Сервис базы данных PostgreSQL для проекта "Вечерний детектив"
|
||||
postgres_evening_detective_server:
|
||||
image: postgres:15
|
||||
container_name: postgres_evening_detective_server
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: detective
|
||||
POSTGRES_DB: evening_detective_server
|
||||
TZ: Asia/Barnaul # Для системного времени контейнера
|
||||
PGTZ: Asia/Barnaul # Специфичная для PostgreSQL переменная
|
||||
# Учетные данные для подключения к БД
|
||||
POSTGRES_USER: postgres # Имя пользователя
|
||||
POSTGRES_PASSWORD: you_password # Пароль пользователя (в продакшене нужно менять!)
|
||||
POSTGRES_DB: evening_detective_server # Имя создаваемой базы данных
|
||||
# Настройки временной зоны
|
||||
TZ: Asia/Barnaul # Системная временная зона контейнера
|
||||
PGTZ: Asia/Barnaul # Временная зона для PostgreSQL (специфичная переменная)
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "5432:5432" # Стандартный порт PostgreSQL
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U postgres -d evening_detective_server -h localhost" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# Сервис файлового хранилища RustFS для проекта "Вечерний детектив"
|
||||
rustfs_evening_detective_server:
|
||||
image: rustfs/rustfs:latest
|
||||
container_name: rustfs_evening_detective_server
|
||||
environment:
|
||||
# Учетные данные для подключения к FS
|
||||
- RUSTFS_ACCESS_KEY=rustfs
|
||||
- RUSTFS_SECRET_KEY=you_password
|
||||
# Включаем и настраиваем веб-консоль
|
||||
- RUSTFS_CONSOLE_ENABLE=true
|
||||
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
|
||||
- RUSTFS_ADDRESS=0.0.0.0:9000
|
||||
ports:
|
||||
- "9000:9000" # Порт для S3 API
|
||||
- "9001:9001" # Порт для веб-консоли
|
||||
volumes:
|
||||
- rustfs_data:/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
healthcheck:
|
||||
test: [ "CMD", "sh", "-c", "curl -f http://localhost:9000/health && curl -f http://localhost:9001/health" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
rustfs_data:
|
||||
|
||||
Reference in New Issue
Block a user