How to Install Exalate for Salesforce on Docker?

    You can host Exalate for Salesforce on your own server. To do so, you need to install Exalate on Docker.

    Check out Docker documentation for details on how to install Docker.

    How to Install Exalate for Salesforce on Docker?

    1. Create or download the docker-compose.yml

    The below example docker-compose.yml file can be used to install Exalate for Salesforce.

    1. Create a directory that would hold the docker-compose file:

      cd ~
      mkdir exalate-salesforce
    2. Create or download a docker-compose.yml file

      Click docker-compose.yml to download the file.


      The file should contain the following information:

      We recommend using the latest version of Exalate for Salesforce. It can be found in the Release History.

      Enter the latest version in the image tag. For example, in image: idalko/salesforcenode:5.1.3, the version of Exalate for Salesforce is 5.1.3 .

      version: '2'
      
      services:
        database:
          restart: unless-stopped
          image: postgres:12.9
          volumes:
            - ./persist/db:/var/lib/postgresql/data
            - ./createdb.sh:/docker-entrypoint-initdb.d/init-user-db.sh
          environment:
            - POSTGRES_PASSWORD=idalko
            - DB_NAME=salesforcenode
            - DB_USER=idalko
            - DB_PASS=idalko
          networks:
            - dbnet
      
        salesforce:
          restart: unless-stopped
          ports:
            - 9000:9002
      
          #
          # Change the image tag to the required version
          # Check Release History on docs.exalate.com for an overview
          #
          image: idalko/salesforcenode:5.4.0.1
          depends_on:
            - database #wait for postgres to be started, not for ready
          volumes:
            - ./persist/home:/opt/salesforcenode/data
          environment:
            # Add your enviroment settings here
            - SALESFORCENODE_PG_HOST=database
            - SALESFORCENODE_PG_DB=salesforcenode
            - SALESFORCENODE_PG_USER=idalko
            - SALESFORCENODE_PG_PWD=idalko
          networks:
            - dbnet
            - default
      
      networks:
        dbnet:
          driver: bridge
        default:
          driver: bridge
        

    2. Ensure that a correct database is set up using a createdb.sh

    Create or download a createdb.sh file (referenced from docker-compose.yml):

    Click createdb.sh to download the file.

    The file should contain the following information:

    #!/bin/bash
     
    TEST=`psql -U postgres <<-EOSQL
       SELECT 1 FROM pg_database WHERE datname='$DB_NAME';
    EOSQL`
     
    echo "******CREATING DOCKER DATABASE******"
    if [[ $TEST == "1" ]]; then
        # database exists
        # $? is 0
        exit 0
    else
    psql -U postgres <<-EOSQL
       CREATE ROLE $DB_USER WITH LOGIN ENCRYPTED PASSWORD '${DB_PASS}' SUPERUSER;
    EOSQL
     
    psql -U postgres <<-EOSQL
       CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
    EOSQL
     
    psql -U postgres <<-EOSQL
       GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;
    EOSQL
    fi
     
    echo ""
    echo "******DOCKER DATABASE CREATED******"
      

    3. Set environment variables if necessary

    Below you can find the environment variables used for the app container. All of them are optional, and in the given example, we've overridden SALESFORCENODE_PG_DB, SALESFORCENODE_PG_USER, and SALESFORCENODE_PG_PWD just to show how to pass different credentials to the Exalate application.

    Full list of environment variables
    Variable nameExampleDescription
    SALESFORCENODE_PG_HOSTSALESFORCENODE_PG_HOST=databasetells Exalate where is the Postgres database to connect is hosted
    SALESFORCENODE_PG_DBSALESFORCENODE_PG_DB=exalatetells Exalate what is the Postgres database name for the Exalate application
    SALESFORCENODE_PG_USERSALESFORCENODE_PG_USER=exalatetells the Exalate application what is the Postgres database user name for the Exalate application to perform queries with
    SALESFORCENODE_PG_PWDSALESFORCENODE_PG_PWD=secrettells the Exalate application what is the Postgres database user's password for the Exalate application to perform queries with
    SMTP_HOST_NAMESMTP_HOST_NAME=smtp.gmail.comThe host name of the SMTP server used to send error notifications
    SMTP_PORTSMTP_PORT=587Port (also check the TLS setting)
    SMTP_FROMSMTP_FROM=my.name@gmail.comEmail that is used to send error notifications
    SMTP_LOGINSMTP_LOGIN=my.nameLogin to the SMTP service
    SMTP_PASSSMTP_PASS=secret

    Password to the SMTP service

    SMTP_TLSSMTP_TLS=trueCan be set to false, but then the SMTP_PORT should be set to the port, that accepts non-SSL and non-TLS connections

    Using a Proxy for Outgoing Connections

    Whenever the Exalate node needs to use a proxy to establish outgoing connections use the following parameters in the environment (naming should be obvious):

    • PROXY_HTTP_HOST
    • PROXY_HTTP_PORT
    • PROXY_HTTPS_HOST
    • PROXY_HTTPS_PORT

    4. Register the node

    To be able to fully use the functionality of your new node, it needs to be registered on the mapper. This mapper acts as a DNS server mapping tracker URLs to node URLs

    This is currently a manual operation to be requested through the support portal (here).

    Please be ready to provide

    • Exalate node URL
    • Exalate node instance ID
    • Salesforce instance URL

    5. Start the application

    cd ~/exalate-salesforce
    docker-compose up -d

    After starting Exalate for Salesforce you will need to verify your instance. To do so, submit a support request to our Service Desk directly. 

    Troubleshooting

    Problems during the installation of the Exalate server for Salesforce

    If you have problems during the installation of the Exalate app for Salesforce you can find logs describing possible problems inside /tmp.

    The name for the file is generated randomly and automatically by the OS, but you can find the file by the creation date.

    Problems while running the Exalate server for Salesforce

    Logs will be generated under the directory: /opt/salesforcenode/data/logs.

    Refer to these logs to get more information about possible problems and communicate with our support if you need any assistance.

    Support

    Check our Support options.