services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: thoughts ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 nats: image: nats:2-alpine ports: - "4222:4222" - "8222:8222" # monitoring endpoint command: ["--jetstream", "--http_port", "8222"] volumes: postgres_data: