Docker Compose

The following is an example of how to configure Docker Compose to start all SV containers and their dependencies:

version: '3'

volumes:
  sv.work:
  sv.app.config:
  sv.logs:
  postgres.data:
  svlab.logs:
  apls.logs:
  apls.config:
  apls.data:
  
services:
  sv-server:
    image: virtualization/sv-server
    container_name: sv-server
    tty: true
    environment:
      - SV_DB_WAIT_FOR=sv-db:5432
      - SV_SERVER_AGENT_PORTS=6060-6079
      - SV_DB_TYPE=postgresql
      - SV_DB_DATASOURCE=;Host=sv-db;Database=postgres
      - SV_DB_USERNAME=postgres
      - SV_DB_PASSWORD=password
      - SV_LICENSE_SERVER_URL=https://apls:5814 
      - SV_HOSTNAME=${HOST_NAME}
    ports:
      - 6085:6085 # secure REST endpoint
      - 6060-6079:6060-6079 # SV agents
    volumes:
      - sv.work:/opt/microfocus/sv-server/work
      - sv.app.config:/opt/microfocus/sv-server/app.config
      - sv.logs:/opt/microfocus/sv-server/logs
    stop_grace_period: 2m
    depends_on:
      - sv-db
      - apls
  sv-lab-server:
    image: virtualization/sv-lab-server
    container_name: sv-lab-server
    hostname: ${HOST_NAME}
    environment:
      - SV_LAB_SERVER_CONNECTOR_PORTS=9000-9019
    ports:
      - 8445:8445 # secure REST endpoint
      - 9000-9019:9000-9019 # SV connectors
    volumes:
      - /opt/LabServer/log/
    stop_grace_period: 2m
  sv-svm:
    image: virtualization/sv-svm
    container_name: sv-svm
    hostname: ${HOST_NAME}
    tty: true
    environment:
      - SV_SSL_CERTIFICATE_GENERATE=false
    ports:
      - 6086:6086 # secure WWW
    volumes:
      - sv.work:/opt/microfocus/sv-server/work
      - sv.logs:/opt/microfocus/sv-server/logs
    stop_grace_period: 2m
  sv-db:
    image: postgres
    container_name: sv-db
    environment:
      - POSTGRES_PASSWORD=password
    volumes:
      - postgres.data:/var/lib/postgresql/data
  apls:
    image: mfsharedtech/apls:11.5.0-2020032022
    container_name: apls
    privileged: true
    ports:
      - 5814:5814
    environment:
     - EULA=true
    volumes:
      - apls.logs:/logs/
      - apls.config:/config/
      - apls.data:/var/opt/autopass/apls/licenseserver/data/

Back to top

See also: