version: "2.0"

services:
  hotness:
    build:
      context: .
      dockerfile: Containerfile.dev
      args:
        FEDORA_VERSION: 34
    container_name: "hotness"
    network_mode: host
    volumes:
      - ./:/app
    privileged: true
    tty: true
    restart: unless-stopped
    depends_on:
      rabbitmq:
        condition: service_started
      redis:
        condition: service_started

  rabbitmq:
    image: docker.io/library/rabbitmq:3.8.16-management-alpine
    container_name: "rabbitmq"
    network_mode: host
    restart: unless-stopped
    healthcheck:
      test: [ "CMD", "nc", "-z", "localhost", "5672" ]
      interval: 3s
      timeout: 3s
      retries: 30
    environment:
      - RABBITMQ_DEFAULT_USER=hotness
      - RABBITMQ_DEFAULT_PASS=hotness

  redis:
    image: docker.io/library/redis:6.0.9-alpine
    container_name: "redis"
    network_mode: host
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 3s
      timeout: 3s
      retries: 15


version: "2.0"

services:
  hotness:
    build:
      context: .
      dockerfile: Containerfile.dev
      args:
        FEDORA_VERSION: 34
    container_name: "hotness"
    volumes:
      - ./:/app
    privileged: true
    tty: true
    restart: unless-stopped
    depends_on:
      rabbitmq:
        condition: service_started
      redis:
        condition: service_started

  rabbitmq:
    image: docker.io/library/rabbitmq:3.8.16-management-alpine
    container_name: "rabbitmq"
    restart: unless-stopped
    ports:
      - "5672:5672"
      - "15672:15672"
    healthcheck:
      test: [ "CMD", "nc", "-z", "localhost", "5672" ]
      interval: 3s
      timeout: 3s
      retries: 30
    environment:
      - RABBITMQ_DEFAULT_USER=hotness
      - RABBITMQ_DEFAULT_PASS=hotness

  redis:
    image: docker.io/library/redis:6.0.9-alpine
    container_name: "redis"
    restart: unless-stopped
    ports:
      - "6379:6379"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 3s
      timeout: 3s
      retries: 15

Define ports instead of using network_mode: host
Define ports instead of using network_mode: host

On Fedora 36 the podman-compose up is failing with multi-service deployment when
network_mode is set to host. Setting the specific ports makes the ports
available in both host and hotness container.

Signed-off-by: Michal Konečný <ee90a345d5d5a9b1fcc0d90446d9d8a36f3b88d1@redhat.com>
