Public Repository

Last pushed: 5 hours ago
Short Description
Child Welfare Digital Services API
Full Description

API supporting California's Child Welfare Digital Services

postgresql and db2data containers need to be up and running before starting the application server
1. Pull the Docker image to local machine
docker pull cwds/api

Pulls the docker image with DB2 Express-C installed by default.

2. Start the container in docker daemon
The execution of the container should be in Privileged mode
docker run -it -d --name=<USER DEFINED NAME> -p 8080:8080 -e DB_CMS_USER=db2inst1 -e DB_CMS_PASSWORD=<pwd assigned to db2inst1> -e DB_CMS_JDBC_URL=jdbc:db2://DB2_database_host:50000/DB0TDEV -e DB_CMS_SCHEMA=<db2 schema> -e DB_NS_USER=postgres -e DB_NS_PASSWORD=<password assigned to postgresql> -e DB_NS_JDBC_URL=jdbc:postgresql://POSTGRESQL_DATABASE_HOST:5432/postgres -e DB_NS_SCHEMA=<postgres schema> cwds/api
  • -p 8080:8080 exposes port 8080 to allow connections from the host

In order for the CWDS API successfully connect to the above databases the following environment variables are required to be set:

  • DB_NS_USER -- the CWDS NS database username
  • DB_NS_PASSWORD -- the CWDS NS database password
  • DB_NS_JDBC_URL -- the CWDS NS database URL in Java Database Connectivity format
  • DB_CMS_USER -- the CWDS CMS database username
  • DB_CMS_PASSWORD -- the CWDS CMS database password
  • DB_CMS_JDBC_URL -- the CWDS CMS database URL in Java Database Connectivity format
  • DB_CMS_SCHEMA -- the CWDS CMS database schema the tables belong to.

The Environment Variables that are required to connect the API can be found in the Environment Variables

Note :
The host name for the jdbc will be either the IP address of the docker VM or the localhost, Depends on the version of the Docker installed in your local system.


After successfully running the container in the daemon mode access the API application in the browser

Docker Pull Command