The Assessment Builder platform is developed by Coko for the HHMI. If you're working on this platform, refer to the documentation HHMI & Coko Team shared: AB Project.
To bring the application up for development, simply run docker-compose up and everything should be running.
You can override the default environment variables by declaring them in a .env file at the root of the project.
Coko Team and hosting organisation, Forum 1, please refer to the Production Deployment document
- Make sure these dependencies exist in your OS, so that node modules can build successfully
- Make sure these environment variables are set in a
.envfile in the root of the repo - I am assuming you already have a postgres db and an S3 instance set up, so you'd only need the credentials at this point
This script should suffice I believe
source .env
cd packages/server
yarn install --frozen-lockfile --production
sh scripts/setupDevServer.sh
node startServer.jsYou should see output from the above, telling you that the migrations that haven't run yet did run now, the seed scripts completely successfully and that the server is running.
You can also try making a call to the /healthcheck endpoint, which should return a 200 response.
- Set these environment variables, as well as the
SERVER_URL
source .env
yarn install --frozen-lockfile --production
cd packages/client
yarn coko-client-build-jsAfter the build has finished, you should have a _build folder.
You can serve that with eg. npx serve -p 8080 --single ./_build, or by setting up nginx, or whatever other server you prefer.
It's just a static bundle at this point, how it's served shouldn't make a difference.
First run docker-compose -f docker-compose.production-local.yml up. This will bring up the db and minio server that the production compose file takes for granted. Wait until the bucket has been successfully created, and then you can follow the instructions from the "Production" section.
You can simply use our server and client Dockerfile-production files in combination with the docker-compose.production.yml file as an instruction manual for how to bring the app up.
For the client specifically, we use the serve library to bring the app up, but there's no reason why you shouldn't use your favourite server (eg. nginx) to serve the static build.