version: '3'
services:
  broker:
    container_name: broker
    image: vromero/activemq-artemis
    restart: unless-stopped
    environment:
      - ARTEMIS_USERNAME=entaxy
      - ARTEMIS_PASSWORD=entaxy
    ports:
      - 8161:8161
      - 61616:61616

  db-postgres:
    container_name: db-postgres
#    image: postgres
    build: ./postgres
    restart: unless-stopped
    volumes:
      - db-vol:/var/lib/postgresql/data
    #   - /etc/localtime:/etc/localtime:ro
    environment:
      - POSTGRES_USER=entaxy
      - POSTGRES_PASSWORD=entaxy
      - POSTGRES_DB=cache
    ports:
      - 5432:5432

  # db-mssql:
  #   container_name: db-mssql
  #   image: mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
  #   restart: unless-stopped
  #   environment:
  #     - SA_PASSWORD=123mssql
  #     - ACCEPT_EULA=Y
  #     - POSTGRES_DB=cache
  #   ports:
  #     - 1433:1433

#  nexus:
#    container_name: nexus
#    image: sonatype/nexus3
#    restart: unless-stopped
#    volumes:
#      - nexus-data:/nexus-data
#    environment:
#      - INSTALL4J_ADD_VM_PARAMS=-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g
#    ports:
#      - 8081:8081
  maven-repo:
    container_name: maven-repo
    build: ./reposilite
#    image: dzikoysk/reposilite
    restart: unless-stopped
    volumes:
      - nexus-data:/app/data
    ports:
      - 8081:80

  karaf:
#    image: apache/karaf:4.2.9
    build:
      context: karaf/
    container_name: karaf
#    environment:
#      - ESB_ENTAXY_VERSION=1.8.0
#      - ESB_ENTAXY_MAVEN_REPO=http://nexus:8081/repository/maven-snapshots/@id=local-nexus@snapshots@noreleases
    restart: unless-stopped
    ports:
      - 8101:8101
      - 8181:8181
      - 8080:8080

volumes:
  db-vol:
    driver: local
  nexus-data:
    driver: local