- Docker Engine >= 17.x
- Docker-compose >= 1.17
The configuration can be found in the configuration file ./config/default.js.
You can update the configuration file or set values to the corresponding environment variables.
LOG_LEVELThe log level, e.g.debug,info, or 'error'KAFKA_GROUP_IDThe client group ID for committing and fetching offsets. All clients sharing the same group ID belong to the same groupKAFKA_URLThe comma delimited list of initial brokers listKAFKA_CLIENT_CERTThe client cert, can be (1) the path to the cert file, or (2) the cert contentKAFKA_CLIENT_CERT_KEYThe client cert key, can be (1) the path to the cert key file, or (2) the cert key contentKAFKA_NEW_SUBMISSION_TOPICThe new submission topic from which the app consumes eventsKAFKA_NEW_SUBMISSION_ORIGINATORThe new submission event originatorKAFKA_UPDATE_SUBMISSION_TOPICThe update submission topic from which the app consumes eventsSUBMISSION_API_URLThe Submission API URLSUBMISSION_TIMEOUTThe Submission API timeoutDB_NAMElegacy database name 'dbname@db_server_name'DB_USERNAMEdatabase usernameDB_PASSWORDdatabase passwordID_SEQ_UPLOADupload database sequenceID_SEQ_SUBMISSIONsubmission database sequenceAUTH0_URLauth0 urlAUTH0_AUDIENCEauth0 audienceTOKEN_CACHE_TIMEauth0 token cache timeAUTH0_CLIENT_IDauth0 client idAUTH0_CLIENT_SECRETauth0 client secretCHALLENGE_INFO_APIThe challenge info api template with {cid} gets replaced with challenge idCHALLENGE_SUBTRACKThe sub track of marathon match challenge
./config/production.js, ./config/staging.js, ./config/test.js will use same configuration variables as ./config/default.js except ./config/test.js will have new configurations for test only.
MOCK_SUBMISSION_API_PORTThe mock submission api portMOCK_SERVER_PORTThe mock server port for challenge api
./config/mock.js will use same configuration variables as ./config/default.js except
MOCK_SERVER_PORTThe mock server port for challenge api
./test/test_files/sqlParams.json will load necessary sql params used in test, it will only work if you run ./test/sql/test.sql.
NOTE: ALL COMMANDS BELOW EXECUTE UNDER
<legacy-sub-procecssor>directory
To build the application you must set the DB_SERVER_NAME environment variable. This variable holds the database hostname.
We only need to do this once
export DB_SERVER_NAME=informix
docker-compose build lsp-appBuild Kafka image:
docker-compose build kafkaRun Kafka server:
docker-compose up -d kafka
docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create"
docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update"export DB_SERVER_NAME=informix
docker-compose up lsp-app-installexport DB_SERVER_NAME=informix
docker-compose up lsp-app- Make sure you're running a clean database (you can take down tc-informix container and then up it again)
- Stop
legacy-sub-processorapplication if it was running - Install test data and you may start service
tc-informixwith commanddocker-compose up tc-informixif not started
docker cp test/sql/test.sql iif_innovator_c:/
docker exec -ti iif_innovator_c bash -c "source /home/informix/ifx_informixoltp_tcp.env && dbaccess - /test.sql"- Run kafka container (and create topic if you haven't do this before)
- Run (you can use
docker-compose run lsp-app-testtoo and it is more suitable for test command)
docker-compose up lsp-app-testheroku login
heroku create
heroku container:push web --arg servername=<DATABASE_SERVER>
heroku container:release web- Check code style
npm run lint - Check code style with option to fix the errors
npm run lint:fix