
services:
  kontor-fiber:
    build:
      context: ./kontor-fiber
      dockerfile: Dockerfile
      tags:
        - kontor-fiber:0.2.0-SNAPSHOT
    image: kontor-fiber:0.2.0-SNAPSHOT
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://kontor-fiber:8600/health"]
      interval: 10s
      timeout: 5s
      retries: 3
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8600:8600
    depends_on:
      postgres:
        condition: service_healthy
  kontor-echo:
    build:
      context: ./kontor-echo
      dockerfile: Dockerfile
      tags:
        - kontor-echo:0.2.0-SNAPSHOT
    image: kontor-echo:0.2.0-SNAPSHOT
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://kontor-echo:8700/health"]
      interval: 10s
      timeout: 5s
      retries: 3
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8700:8700
    depends_on:
      postgres:
        condition: service_healthy
  kontor-quarkus:
    build:
      context: ./kontor-quarkus
      dockerfile: Dockerfile
      tags:
        - kontor-quarkus:0.2.0-SNAPSHOT
    image: kontor-quarkus:0.2.0-SNAPSHOT
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://kontor-quarkus:8800/q/health"]
      interval: 10s
      timeout: 5s
      retries: 3
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8800:8800
    depends_on:
      postgres:
        condition: service_healthy
  kontor-angular:
    build:
      context: ./kontor-angular
      dockerfile: Dockerfile
      tags:
        - kontor-angular:0.2.0-SNAPSHOT
    image: kontor-angular:0.2.0-SNAPSHOT
    restart: unless-stopped
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8200:80
    depends_on:
      kontor-api:
        condition: service_healthy
  kontor-vue:
    build:
      context: ./kontor-vue
      dockerfile: Dockerfile
      tags:
        - kontor-vue:0.2.0-SNAPSHOT
    image: kontor-vue:0.2.0-SNAPSHOT
    restart: unless-stopped
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8300:80
    depends_on:
      postgres:
        condition: service_healthy
  kontor-javalin:
    build:
      context: ./kontor-javalin
      dockerfile: Dockerfile
      tags:
        - kontor-javalin:0.2.0-SNAPSHOT
    image: kontor-javalin:0.2.0-SNAPSHOT
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://kontor-javalin:8400/health"]
      interval: 10s
      timeout: 5s
      retries: 3
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8400:8400
    depends_on:
      postgres:
        condition: service_healthy

networks:
  integration:
    name: integration
  frontend:
volumes:
  activemq-data:
  images-data:
