services: backend: build: . ports: - '3001:3001' - '9229:9229' # debugger environment: - NODE_ENV=production - PORT=3001 depends_on: - db db: image: postgres:13 restart: always environment: POSTGRES_USER: user POSTGRES_PASSWORD: password POSTGRES_DB: mydatabase ports: - '5432:5432' volumes: - db_data:/var/lib/postgresql/data healthcheck: test: ['CMD-SHELL', 'pg_isready -U user -d mydatabase'] interval: 5s timeout: 5s retries: 5 volumes: db_data: