name: stelo_compose

services:
  stelo-webdrm:
    image: stelodata/stelo-manager:latest
    container_name: stelo-webdrm
    restart: always
    ports:
      - ${WEBDRM_PORT}:3000
    networks:
      - stelo_net

  stelo-full:
    environment:
      - TZ
    image: stelodata/stelo-full:latest
    hostname: stelo-full
    container_name: stelo-full
    privileged: true
    restart: always
    volumes:
      - sq-config:/var/sqdr
      - sqplus-config:/var/sqdrplus
      - backups:/backups
      - db2-home:/home/db2inst1
      - db2-data:/data/db2
      - db2-logs:/logs/db2
      - /etc/localtime:/etc/localtime:ro
    ports:
      - ${EXPOSE_SQDR_PORTS}:${SQDR_PORTS}
      - ${EXPOSE_CONTROL_DB_PORTS}:${CONTROL_DB_PORTS}
      - ${EXPOSE_CONTROL_CENTER_PORT}:${CONTROL_CENTER_PORT}
    networks:
      stelo_net:
        aliases:
          - default_service # Essential for resolving "*Default" service in WebDRM's internal network communication

volumes:
  sq-config:
    external: true

  sqplus-config:
    external: true

  backups:
    external: true

  db2-home:
    external: true

  db2-data:
    external: true

  db2-logs:
    external: true

networks:
  stelo_net:
