services: postgres: image: postgres:16-alpine container_name: hello-postgres environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: hellodb ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 backend: build: ./backend container_name: hello-backend ports: - "8080:8080" environment: DB_HOST: postgres DB_PORT: 5432 DB_USER: postgres DB_PASSWORD: postgres DB_NAME: hellodb PORT: 8080 depends_on: postgres: condition: service_healthy frontend: build: ./frontend container_name: hello-frontend ports: - "3000:3000" environment: NEXT_PUBLIC_API_URL: http://localhost:8080 depends_on: - backend volumes: postgres_data: