Unfortunately we do not have a licence to use Docker Desktop at BC Gov. If you are on a mac here is a blogpost about how to setup Lima as an alternative solution for development purposes.
The backend and all services are setup to run via docker. To start everything up you can run in the project folder:
docker-compose up --build
This will start up a postgres database, a Django web app, and a MinIO service with a bucket itvr
Django offers many helpful mangement commands out of the box. To be able to use these with docker you can access the python environment with bash:
docker-compose exec api bash
To create a Django admin user try running this command in the shell:
python manage.py createsuperuser
The admin panel is available here: http://localhost:8000/admin/
You can view Django Restframework's browseable api here: http://localhost:8000/api/
Use a created superuser to login and view the api.
You can view the contents of the bucket in MinIO by visiting http://localhost:9001/login
. Use env variables MINIO_ROOT_USER
and MINIO_ROOT_PASSWORD
to login to the console. Default values are found in minio.env
We take advantage that MinIO is S3 compatible and use django-storages S3 backend for media files.
We are using a shared realm Keycloak client. Shared realm clients can be accessed and configured via Common Hosted Single Sign-on (CSS)
Once added as a team member to existing projects (this project is called itvr
), you can configure the redirect urls for each environment (dev, test, prod). Installation json is available as well as some helpful documentation about integrating the client.
We are using CHES to send email. Documentation is available here
To get access to the created client, go request account with application acronym ITVR
. This will allow you to reset client secrets for environments (dev, test, prod) as needed.
We've decided to run the frontend outside of docker at this time mostly because of mounted Lima volumes causing issues with npm permissions. Track the open issue
To run the frontend you will need node.js installed. A good way to manage node these days is with asdf. File .tool-versions
contains current versions of tools used in this application. After setting up asdf run this at the project root:
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install
The frontend is built using Create React App. To run the frontend:
cd frontend
npm i
npm start
The app is available by default at http://localhost:3000/
To use Storybook for developing a component:
cd frontend
npm run storybook
The storybook is available by default at http://localhost:6006/
We use Openshift to deploy our applications. Access the console here
There's training on Openshift offered by BCDevExchange. Check the schedule here