name: lsfusion

services:
  db:
    image: postgres:latest
    volumes:
      - ./docker-db:/var/lib/postgresql/data # host/path:container/path
    environment:
      POSTGRES_PASSWORD: 11111

  server:
# jenkins uses regex for replace image version in next line before build. Check jenkins branch on change
    image: lsfusion/server:6.0-beta2
    depends_on:
      - db
    volumes:
      - ./docker-server:/lsfusion # host/path:container/path
# use default credentials if dont define environment variables or modifying settings.properties in ./docker-server/conf
# available variables names: DB_SERVER, DB_PASSWORD, DB_USER, DB_NAME, JAVA_OPTS
# environment variables can be used separately
# priority: default -> settings.properties -> environment variables
    environment:
      - DB_SERVER=db
      - DB_PASSWORD=11111
      - LANG=${LANG} # set locale from the host because the image openjdk from lsfusion/server uses C.UTF-8 locale

  client:
# jenkins uses regex for replace image version in next line before build. Check jenkins branch on change
    image: lsfusion/client:6.0-beta2
    depends_on:
      - server
    volumes:
      - ./docker-client-conf:/usr/local/tomcat/conf/Catalina # host/path:container/path
    ports:
      - "8080:8080"
# use default credentials if dont define environment variables or modifying ROOT.xml in ./docker-client/Catalina/localhost.
# available variables names: SERVER_HOST, SERVER_PORT, JAVA_OPTS
# if use environment variables - use SERVER_HOST and SERVER_PORT both
# priority: default -> ROOT.xml -> environment variables
    environment:
      - LANG=${LANG} # set locale from the host because the image tomcat from lsfusion/client uses C.UTF-8 locale
      - APP_REGISTRY_SERVER=server