2026-04-02 21:27:09 +06:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
container_name: server_database
|
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: postgres123
|
|
|
|
|
POSTGRES_DB: server_db
|
|
|
|
|
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
2026-04-03 00:54:46 +06:00
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
container_name: server_redis
|
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
- redis_data:/data
|
|
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
2026-04-02 21:27:09 +06:00
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|
2026-04-03 00:54:46 +06:00
|
|
|
redis_data:
|