Zooniverse API specific Cellect server
Use the docker-compose tool to get started.
docker-compose up
- Alternatively
docker-compose build cellect
&&docker-compose up
- You'll need a database running to run the specs. Best bet is to use the docker-compose pg database as per development.
docker-compose run -d --name postgres_cellect --service-ports postgres
- Once done you can use the DATABASE_URL env var to configure ActiveRecord.
DATABASE_URL=postgresql://panoptes:panoptes@localhost:6000/cellect_panoptes_test
- Create the db using rake tasks and load the test schema (db/schema.rb)
RACK_ENV=test DATABASE_URL=postgresql://panoptes:panoptes@localhost:6000/cellect_panoptes_test rake db:setup
- Once all that is done you can run the specs via
RACK_ENV=test DATABASE_URL=postgresql://panoptes:panoptes@localhost:6000/cellect_panoptes_test rspec
Or use docker-compose to get a bash session in the container
docker-compose run --service-ports --rm cellect bash
RACK_ENV=test rake db:setup
RACK_ENV=test rspec
Don't forget to tear down the daemonized postgres container when your done.