include:
  - ./compose-postgres.yaml

services:
  activemq:
    image: apache/activemq-artemis:latest-alpine
    restart: unless-stopped
    ports:
      - 61616:61616
      - 8161:8161
      - 5672:5672
    networks:
      - integration
      - frontend
    volumes:
      - activemq-data:/var/lib/artemis-instance
  kontor:
    build:
      context: ./kontor-spring
      dockerfile: Dockerfile
      tags:
        - kontor:0.2.0-SNAPSHOT
    image: kontor:0.2.0-SNAPSHOT
    restart: unless-stopped
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8000:8000
    volumes:
      - images-data:/data/images
    depends_on:
      postgres:
        condition: service_healthy
  kontor-api:
    build:
      context: ./kontor-api
      dockerfile: Dockerfile
      tags:
        - kontor-api:0.2.0-SNAPSHOT
    image: kontor-api:0.2.0-SNAPSHOT
    restart: unless-stopped
    networks:
      - database
      - integration
      - frontend
    ports:
      - 8800:8800
    volumes:
      - images-data:/data/images
    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:
      postgres:
        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

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

