generated from VLADIMIR/template
add rustfs
This commit is contained in:
+42
-6
@@ -1,20 +1,56 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
# Сервис базы данных PostgreSQL для проекта "Вечерний детектив"
|
||||
postgres_evening_detective_server:
|
||||
image: postgres:15
|
||||
container_name: postgres_evening_detective_server
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: evening_detective_server
|
||||
TZ: Asia/Barnaul # Для системного времени контейнера
|
||||
PGTZ: Asia/Barnaul # Специфичная для PostgreSQL переменная
|
||||
# Учетные данные для подключения к БД
|
||||
POSTGRES_USER: postgres # Имя пользователя
|
||||
POSTGRES_PASSWORD: postgres # Пароль пользователя (в продакшене нужно менять!)
|
||||
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
|
||||
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=rustfs
|
||||
# Включаем и настраиваем веб-консоль
|
||||
- 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
|
||||
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