HyperGraphQL logo

A GraphQL interface for querying and serving linked data on the Web.

Containers & Configuration


This section describes how to run an instance of HyperGraphQL in a container, such as Amazon Web Services ElasticBeanstalk, as well as how to configure these from remote locations, such as Amazon Web Services S3.

Although this documentation discusses AWS, the general principles can be applied to any container and storage mechanism.

Configuration options

The configuration parameters are used to point at the location of configuration files. These files can reside in a number of places:

Command Line

Command-line parameters are:

NB: parameters can be specified as -<parameter> or --<parameter>

-classpath - (Optional) - If present, look for the configuration files on the classpath
-config - (Either this or the --s3 parameter must be present) - location(s) of the configuration files - can be a directory, a file or a list of files, e.g.:

-s3 - (Required if --config isn’t provided) - Location of a configuration file on AWS S3
-u - (Required if --s3 is set) - accessKey
-p - (Required if --s3 is set) - accessSecretKey
-nobanner - (Optional) - omit banner on startup

Environment Variables

hgql_config - (Required) - where to look for configuration - S3, URL or filesystem
hgql_username - (Optional) - Username / accessKey for remote config resource
hgql_password - (Optional) - Password / accessSecretKey for remote config resource

Running in a container

  1. Set up an application to run with Java 8 using the command:
    java [-Xmx<val>] -jar hypergraphql-<version>-exe.jar [<args>]
    where the -X options can be used to apply various memory options to the JVM see JVM Memory and Baeldung for a non-comprehensive list
    and the args list optionally points to configuration resources
  2. If you are not using command-line parameters, for example to reference a URL for configuration, then set environment variables as appropriate
  3. Don’t forget to upload the executable JAR file
  4. Start your container and test it at http://<container>:<port>/graphiql

Example: Running in AWS Elastic Beanstalk

The demos on this site run in an Elastic Beanstalk instance.

They were deployed in a ZIP file with the structure:


The config and schema files are those described in the [Demo] (/demo/) and [Tutorial] (/tutorial/) sections. Procfile looks like: web: java -jar -Xmx1024 hypergraphql-1.0.3-exe.jar -config demo_services