version: '3'
services:
  pairgoth:
    container_name: pairgoth-engine
    image: maven:3.6.3-openjdk-11-slim
    working_dir: /home/app/pairgoth
    user: "${APP_UID}:${APP_GID}"
    entrypoint: bash -c
    command: '"mvn -e -Duser.home=/home/app clean package && java -jar application/target/pairgoth-engine.war"'
    volumes:
      - ..:/home/app/pairgoth
      - ./data/jetty:/var/lib/pairgoth/jetty
      - ./data/maven:/home/app/.m2
    networks:
      - pairgoth-network
    ports:
     - '5006:5006'
     - '8080:8080'
    environment:
      HOME: "/home/app"
      USER: "app"
      MAVEN_CONFIG: "/home/app/.m2"
      MAVEN_OPTS: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5006"
      SMTP_HOST: ${SMTP_HOST}
      SMTP_PORT: ${SMTP_PORT}
      SMTP_USER: ${SMTP_USER}
      SMTP_PASSWORD: ${SMTP_PASSWORD}
    # restart: unless-stopped
    stdin_open: true
    tty: true
networks:
  pairgoth-network:
    driver: bridge


