name: mycompany

services:
  db:
    image: postgres:latest
    volumes:
      - ./docker-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=11111

  logics:
    image: lsfusion/mycompany:6.2
    volumes:
      - ./docker-server:/lsfusion

  server:
    image: lsfusion/server:6.2
    depends_on:
      db:
        condition: service_started
      logics:
        condition: service_completed_successfully
    volumes:
      - ./docker-server:/lsfusion
    environment:
      - DB_SERVER=db
      - DB_PASSWORD=11111

  client:
    image: lsfusion/client:6.2
    depends_on:
      - server
    volumes:
      - ./docker-client-conf:/usr/local/tomcat/conf/Catalina
    ports:
      - "8080:8080"
    environment:
      - APP_SERVER=server