networks:
  flow_net:
    driver: overlay
    attachable: true


services:

  skv-proxy:
    image: hub.sekva.net/img/apache:latest

    networks:
      - flow_net
    ports:
      - target: 443
        published: 443
        protocol: tcp
        mode: host

    environment:
      - skv_ClientPort=443
      - skv_ProxyPass=http://server:7080/
      - skv_ProxyPassReverse=http://server:7080/
      - skv_ProxyWs=http://server:7080/
      - skv_ProxyWsReverse=http://server:7080/
      - skv_ProxyMaint=http://server:8083/
      - skv_ProxyMaintReverse=http://server:8083/
      - skv_ApacheServerName=server.net


  nodejs:
    image: hub.sekva.net/img/flownodejs:5
    networks:
      flow_net:
        aliases:
          - nodejs

    environment:
      - SKV_HOST=server
      - SKV_PORT=7080
      - SKV_CONTROL_PORT=8083
      - SKV_GENERAL_PORT=8082
      - skv_NodeAuthKey=CHANGE_ME1
      - NODE_OPTIONS=--inspect
      - SKV_DEBUG_USER_FILE=true

    labels:
      - com.centurylinklabs.watchtower.enable=true

    ports:
      - target: 9229
        published: 9229
        protocol: tcp
        mode: host


  server:
    image: hub.sekva.net/img/flowserverboot:5

    networks:
      flow_net:
        aliases:
          - server	
      
    environment:

      - skv_HasOuterCircuit=true
      - skv_ClientPort=7080
      - skv_OuterCircuitHostname=localhost
      - skv_OuterCircuitPort=443
      - skv_BuildServiceUrl=https://sekva.net/build/
      - skv_NodeJsUrl=http://nodejs:1337/
      - skv_SignServiceUrl=http://signer:8085/
      - skv_DefaultTenant=remlock
      - skv_NodeAuthKey=CHANGE_ME1

      - skv_instance2_DbAddress=host.docker.internal
      - skv_instance2_DbName=home
      - skv_instance2_Instance=home

