Files
cryptowallet/docker-compose.yml
ZOMBIIIIIII 89cb6174b7 new version
2026-04-14 20:22:51 +03:00

52 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
postgres:
image: postgres:16-alpine
container_name: cryptowallet-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-cryptowallet_v2}
volumes:
- pgdata:/var/lib/postgresql/data
# Наружу НЕ экспозим — только docker network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-cryptowallet_v2}"]
interval: 5s
timeout: 5s
retries: 10
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
api:
build:
context: .
dockerfile: Dockerfile
image: cryptowallet-api:latest
container_name: cryptowallet-api
restart: unless-stopped
ports:
- "3001:3001"
env_file:
- .env
environment:
# Override внутри docker network
DB_HOST: postgres
API_PORT: "3001"
NODE_ENV: production
depends_on:
postgres:
condition: service_healthy
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
volumes:
pgdata:
driver: local