---

services:
  portainer:
    image: "{{ portainer_image }}"
    container_name: "{{ portainer_name }}"
    ports:
      - "{{ portainer_edge_agent_port }}:8000"
      - "{{ portainer_legacy_port }}:9000"
      - "{{ portainer_web_port }}:9443"
    volumes:
      - "/var/run/podman/podman.sock:/var/run/docker.sock"
      - "{{ portainer_data_path }}:/data"
    restart: always

  portainer-agent:
    image: "{{ portainer_agent_image }}"
    container_name: "{{ portainer_agent_name }}"
    ports:
      - "{{ portainer_agent_port }}:9001"
    volumes:
      - "/var/run/podman/podman.sock:/var/run/docker.sock"
      - "{{ podman_data_mount_point }}:/var/lib/containers"
    restart: always