Код IT Загрузка примера кода…

YAML main.yaml
services:
  frontend:
    image: nginx:alpine
    ports:
      - "80:80"
    networks: ["public", "internal"]

  api:
    image: my-api:1.0
    networks: ["internal"]

  db:
    image: postgres:16
    networks: ["internal"]

networks:
  public:
  internal:
services:
  frontend:
    image: nginx:alpine
    ports:
      - "80:80"
    networks: ["public", "internal"]

  api:
    image: my-api:1.0
    networks: ["internal"]

  db:
    image: postgres:16
    networks: ["internal"]

networks:
  public:
  internal: