Configuration
JAX-RS Jersey doesn't specify how application configurations are to be loaded. jersey-webservice-template, however, utilizes a library called owner.
The configurations in this page can be set from several sources in the following order:
- the operating system's environment variables; for instance, an environment variable can be set with
export DB_URL="jdbc:mysql://db/elide?serverTimezone=UTC"
- the Java system properties; for example, a Java system property can be set using
System.setProperty("DB_URL", "jdbc:mysql://db/elide?serverTimezone=UTC")
- a .properties file placed under CLASSPATH. This file can be put under
src/main/resources
source directory with contents, for example,DB_URL=jdbc:mysql://db/elide?serverTimezone=UTC
Note that environment config has higher priority than Java system properties. Java system properties have higher priority than file based configuration.
CI/CD
The following GitHub Action Secrets needs to be setup:
Secret Name | Definition | How to Get |
---|---|---|
DOCKERHUB_USERNAME | You Docker Hub username | For example, this user's is jack20191124 |
DOCKERHUB_TOKEN | A personal access token (PAT) to use as an Docker CLI authentication from within GitHub Action | Creating an access token |
AWS_WS_PKRVARS_HCL | The HashiCorp Packer variable values file contents | hashicorp-aws |
SSL_CERTIFICATE | SSL cert file for exposing webservice API via secure HTTPS | Installing Free SSL Certificates with Certbot running on Nginx |
SSL_CERTIFICATE_KEY | SSL cert key file for exposing webservice API via secure HTTPS | Installing Free SSL Certificates with Certbot running on Nginx |
NGINX_CONFIG_FILE | Config file for Nginx as a HTTPS reverse proxy | Define Nginx Reverse Proxy Config File |
FILEBEAT_CONFIG_FILE | The standard filebeat.yml file contents | Configure Filebeat |
AWS_WS_TFVARS | The HashiCorp Terraform variable values file contents | hashicorp-aws |
MAVEN_SETTINGS_XML | The contents of Maven settings file for the Webservice project | The exact settings.xml contents containing these meta tags |
OAUTH_PROPERTIES | The contents of the src/main/resources/oauth.properties mentioned above | See Security section above |
AWS_ACCESS_KEY_ID | The exact same AWS_ACCESS_KEY_ID as mentioned in Environment variables to configure the AWS CLI | How to create and configure AWS credentials for Amazon Keyspaces |
AWS_SECRET_ACCESS_KEY | The exact same AWS_SECRET_ACCESS_KEY as mentioned in Environment variables to configure the AWS CLI | How to create and configure AWS credentials for Amazon Keyspaces |
AWS_REGION | The exact same AWS_REGION as mentioned in Environment variables to configure the AWS CLI | How to create and configure AWS credentials for Amazon Keyspaces |