Dataset Manager 배포

Dataset Manager는 docker-compose를 통해 배포되므로 사용자의 설치 장비에 Docker 및 docker-compose가 설치되어 있어야 한다.

다음은 배포를 위한 docker-compose.yaml 파일의 예시이다. 이미지 레지스트리 URL과 이미지 태그는 배포할 때 제공된다.

version: '3'
services:
  tup-ui:
    image: 10.0.0.0:8090/for-qa-testing/oftup/ui:5.1.0
    restart: always
    hostname: 'oflab'
    environment:
      LC_ALL: 'en_US.utf8'
      TZ: 'Asia/Seoul'
    ports:
      - '80:80'
    networks:
      - of_net
    depends_on:
      - tup-server
  tup-server:
    image: 10.0.0.0:8090/for-qa-testing/oftup/server:5.1.0
    restart: always
    user: oflab
    hostname: 'oflab'
    environment:
      LC_ALL: 'en_US.utf8'
      TZ: 'Asia/Seoul'
      DSM_HOST: 'datasetmanager'
      DSM_PORT: '8080'
      CLS_HOST: 'clsmodel'
      CLS_PORT: '19090'
      MIGRATION: 'Y'
    ports:
      - '9000:9000'
      - '9393:9393'
    networks:
      - of_net
    volumes:
      - ./tup/repository:/home/oflab/repository
    depends_on:
      - db
      - db-neo4j
  clsmodel:
    image: 10.0.0.0:8090/for-qa-testing/oftup/ai:5.1.0
    hostname: 'oflab'
    ports:
      - '19090:19090'
    volumes:
      - ./tup/repository:/home/oflab/repository
    environment:
      LC_ALL: 'en_US.utf8'
      TZ: 'Asia/Seoul'
      DB_HOST: 'db'
      DB_PORT: '5432'
      DB_USER: 'oflab'
      DB_PASS: '********'
      DB_NAME: 'oflab'
    networks:
      - of_net
    depends_on:
      - db
      - db-neo4j
  db:
    image: postgres:15
    hostname: 'oflab'
    environment:
      LC_ALL: 'en_US.utf8'
      TZ: 'Asia/Seoul'
      PGTZ: 'Asia/Seoul'
      POSTGRES_USER: 'oflab'
      POSTGRES_PASSWORD: '********'
    ports:
      - '5432:5432'
    volumes:
      - ./database/postgres/data:/var/lib/postgresql/data
    command: postgres -c 'max_connections=200'
    networks:
      - of_net
  db-neo4j:
    image: neo4j:4.4
    environment:
      LC_ALL: 'en_US.utf8'
      TZ: 'Asia/Seoul'
      NEO4J_AUTH: neo4j/********
      NEO4JLABS_PLUGINS: '["apoc"]'
      APOC_VERSION: '4.4.0.1'
      NEO4j_apoc_export_file_enabled: 'true'
      NEO4J_apoc_import_file_enabled: 'true'
      NEO4J_apoc_import_file_use__neo4j__config: 'true'
    volumes:
      - ./database/neo4j/data:/data
      - ./database/neo4j/logs:/logs
      - ./database/neo4j/import:/var/lib/neo4j/import
      - ./database/neo4j/plugins:/plugins
    ports:
      - '7477:7474'
      - '7687:7687'
    networks:
      - of_net
  db-dataset:
    image: postgres:15
    hostname: 'oflab'
    environment:
      POSTGRES_USER: 'oflab'
      POSTGRES_PASSWORD: '********'
    ports:
      - '5532:5432'
    volumes:
      - ./database/postgres-dataset/data:/var/lib/postgresql/data
    command: postgres -c 'max_connections=200'
    networks:
      - of_net
  datasetmanager:
    image: 10.0.0.0:8090/openframe21-spring/datasetmanager:5.1.0
    hostname: oflab
    environment:
      - SPRING_PROFILES_ACTIVE=postgresql
      - TUP_IP=http://tup-server
      - TUP_PORT=9000
      - DUI_IP=dui
      - DUI_PORT=8282
      - ALLOWED_ORIGINS=*
      - DB_IP=db-dataset
      - DB_PORT=5432
      - DB_SCHEMA=oflab
      - DB_USER=oflab
      - DB_PW=********
    volumes:
      - ./tup/repository:/home/oflab/repository
    ports:
      - "18080:8080"
    networks:
      - of_net
    depends_on:
      - db
    restart: always
  dui:
    image: 10.0.0.0:8090/openframe21-spring/datasetmanager-ui:5.1.0
    environment:
      - TZ=Asia/Seoul
      - "NEXT_PUBLIC_SERVER_BASE_URL=http://192.168.0.0:18080/datasetmanager"
      - "NEXT_PUBLIC_INTERNAL_SERVER_URL=http://192.168.0.0:8282/api"
    volumes:
      - ./tup/repository:/home/oflab/repository
    ports:
      - "8282:8282"
    networks:
      - of_net
    depends_on:
      - datasetmanager
    restart: always
networks:
  of_net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16