services: postgres: image: postgres:17-alpine restart: unless-stopped profiles: - local-db environment: POSTGRES_DB: chatsync POSTGRES_USER: chatsync POSTGRES_PASSWORD: chatsync volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ['CMD-SHELL', 'pg_isready -U chatsync'] interval: 5s timeout: 5s retries: 5 app: build: . restart: unless-stopped depends_on: postgres: condition: service_healthy required: false ports: - '3738:3738' extra_hosts: - 'host.docker.internal:host-gateway' env_file: - .env volumes: pgdata: