Skip to content
Wouter den Bakker edited this page Feb 28, 2020 · 8 revisions

Setup:

  • For a quick test setup docker-compose is properly easiest, however Windows Home does not support docker.

Setup server with database using docker-compose:

Setup server using docker:

  • Setup the Validana Node or Validana Processor.
  • Download and install docker (Windows Pro/Education, Mac, Linux, you can ignore the popup asking you to create an account).
  • Download the Dockerfile file.
  • Fill in the variables in the docker file. (Alternately you can provide them when starting the docker using -e VARNAME=VALUE flags.) See Config for what everything does.
    • If you are running a test environment you properly want to set VSERVER_CACHING to false.
  • Run docker build -f Dockerfile -t vserver . where the server was downloaded.

Setup server standalone:

  • Setup the Validana Node or Validana Processor.
  • Download and install node.js.
  • Create a config file for the server. (Alternately use environment variables.)
    • If you are running a test environment you properly want to set VSERVER_CACHING to false.

Starting:

Start server using docker:

  • The first time use docker run --name vserver -d vserver.
  • Subsequent times use docker start vserver.
  • Log can be viewed using docker logs vserver.
  • Using default settings you can now for example request all contracts at: http://localhost:8080/v1/contracts

Start server standalone:

  • Run npm start path/to/config.json (From the folder the server is downloaded to.)
    • Everything will be logged to the standard output, most notably watch the first few seconds to see if there are problems with the setup.
  • Using default settings you can now for example request all contracts at: http://localhost:8080/v1/contracts

Shutdown:

Shutdown server using docker:

  • Run docker stop vserver.

Shutdown server standalone:

  • Send a SIGINT for a graceful shutdown, send a SIGTERM for an attempted graceful shutdown, but a hard shutdown after 10 seconds, send a SIGKILL for an immediate shutdown.