Docker Deployment

September 22, 2023 ยท View on GitHub

Proxeus docker deployment uses docker-compose and requires the following dependencies:

  1. Install Docker Engine
  2. Install docker-compose

Start with Docker Compose

This is the simplest method to work with Proxeus, and will start a local Proxeus platform using images from Docker Hub - or a local build. Check the Environment Variables section, as you will probably need to set up a .env file first.

docker-compose up

This deploys Proxeus using Docker. The repository includes several additional docker-compose YAML files that can be used to deploy the platform in different context:

  • docker-compose.yml
  • docker-compose-extra.override.yml
  • docker-compose-cloud.override.yml
  • docker-compose-local.override.yml

For example, if you would like to use all the default Proxeus nodes (by default only the Document Service is included) in your deployment:

docker-compose -f docker-compose.yml -f docker-compose-extra.override.yml up

In each case you can then use the logs command to see the system status (with the useful -f parameter):

docker-compose logs

For more usage instructions, visit the Docker Compose CLI reference.

Please note that with SELinux enabled: a :z should be added to the end of volume declarations in docker-compose.yml.

Environment variables

Add these to a .env file in the same folder as docker-compose.yml:

NameDefault ValueDescription
PROXEUS_DATA_DIR./dataPath to the directory to use a data store.
PROXEUS_ENCRYPTION_SECRET_KEYA random string of 32 charactersUse a hard key to ensure your database is safe.
PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71The address of the Proxeus contract.
PROXEUS_INFURA_API_KEYYour Infura API KeyAn Infura API Key for Ethereum integration.
PROXEUS_SPARKPOST_API_KEYYour SpartPost KeyA SparkPost API Key for email integration.
PROXEUS_EMAIL_FROMno-reply@example.comThe email address used as sender when Proxeus sends an email.
PROXEUS_PLATFORM_DOMAIN:http://xes-platform:1323The domain of the running platform. Mainly used for display
PROXEUS_ALLOW_HTTP:falseAllow the use of HTTP instead of HTTPS =NOT FOR PRODUCTION=

Development Docker Compose

This file will start the document service available from DockerHub but will start the local Platform built from your local files. This method is preferred during development. This is the default configuration when using docker-compose up from the project root directory. See Share Compose configurations between files and projects

make server-docker
docker-compose build
docker-compose -f docker-compose.yml -f docker-compose-local.override.yml up --remove-orphans

Cloud Docker Compose

This is a docker compose override file, i.e. it must be used in conjunction with the docker-compose.yml file as described in Multiple Compose files. It will add the required configuration to deploy Proxeus on a hosted VM for example on Google Cloud or AWS, including

Please refer to Use Compose in production for more information about running docker compose in production.

This is the method that we use to deploy the Proxeus Demo site. Start with:

docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml -d up

To simplify your deployment, you can rename docker-compose-cloud.override.yml to docker-compose.override.yml and avoid having to specify the file names in the command.

Custom Docker Deployment

The first method to adapt Proxeus to your infrastructure need is to define the environment variables corresponding to your situation. The next level will be to customize a docker-compose.yml file.

For more information see the Configuration docs.