version: '3.3'
services:
  apollo:
    build: Apollo-2.6.2
    restart: always
    links:
      - apollo_db
    ports:
      - "8888:8080"
    environment:
      - WEBAPOLLO_DB_USERNAME=postgres
      - WEBAPOLLO_DB_PASSWORD=password
      - WEBAPOLLO_DB_DRIVER="org.postgresql.Driver"
      - WEBAPOLLO_DB_DIALECT="org.hibernate.dialect.PostgresPlusDialect"
      - WEBAPOLLO_DB_URI="jdbc:postgresql://db/postgres"
    volumes:
      - ./data/jbrowse:/data
      - ./data/postgres-data:/var/lib/postgresql

  apollo_db:
    image: postgres:latest
    environment:
      - POSTGRES_PASSWORD=postgres

  blast:
    build: .
    container_name: blast
    environment:
      - ADMIN_USER=admin
      - ADMIN_PASS=qhYR64PBCVkeiECd7tj/lBOhc2iBybADRgyd4S9hM
      - MAX_FILE_SIZE=4000
      - CPU_NUMBER=5
    volumes:
      - ./blast-data/db:/db
      - ./blast-data/raw:/raw
      - ./blast-data/tmp:/tmp
    ports:
      - "5001:80"
      - "8095:4567"
    restart: always
