# NPM: указывайте Forward на порт 3002 (frontend). Frontend проксирует /api на backend. # Backend, frontend и PostgreSQL — в одной сети (postgres_default). services: backend: build: context: . dockerfile: Dockerfile.backend container_name: family-budget-backend environment: # Имя контейнера/сервиса PostgreSQL — postgres или postgres_budget - DB_HOST=postgres_budget - DB_PORT=5432 - DB_NAME=family_budget - DB_USER=budget_user - DB_PASSWORD=difficult_Paaaaaasword ports: - "3000:3000" restart: unless-stopped networks: - postgres_default frontend: build: context: . dockerfile: Dockerfile.frontend container_name: family-budget-frontend ports: - "3002:80" restart: unless-stopped networks: - postgres_default networks: postgres_default: external: true