This is the RAS Party micro-service.
The API is specified here
Install postgresql
brew install postgresqlInstall pipenv
pip install pipenvUse pipenv to create a virtualenv and install dependencies
pipenv installyou can also use the makefile to do this
make installdocker compose upor use the makefile to run
make startor run locally (this requires postgres running locally on port 5432):
pipenv run python3 run.pyTo test the service is up:
curl http://localhost:8081/infoNote: Acceptance tests can be run to populate a local version with test data
Ensure dev dependencies have been installed
pipenv install --devRun tests with makefile (Note: it is best to run a docker postgres image as the tests expect an empty database, and they will run dramatically faster)
make testThe database will automatically be created when starting the application Alembic is used for database migrations See README.md for alembic documentation
See Confluence for additional information.
Environment variables available for configuration are listed below:
| Environment Variable | Description | Default |
|---|---|---|
| LOGGING_LEVEL | Level of the logging | 'INFO' |
| DATABASE_URI | URI used to connect to the database | 'postgresql://postgres:postgres@localhost:5432/postgres' |
| AUTH_URL | URL of the auth service | |
| CASE_URL | URL of the case service | |
| COLLECTION_EXERCISE_URL | URL of the collection exercise service | |
| FRONTSTAGE_URL | URL of the respondent facing website | |
| IAC_URL | URL of the iac service | |
| NOTIFY_URL | URL of the notify-gateway service | http://notify-gateway-service/emails/ |