- See the Postman public docs site for documentation concerning using the API.
- Currently all data comes from NASA Open APIs. Daily background jobs are run populate the data base with data.
This app is dockerized soley for development environment normalization. It's not required to do development, it's just here for convenience.
docker-compose build
- build the containerized appdocker-compose up
- start the app on localhost:3000
Prefix commands with docker-compose run app
to run them agaist the application
container. For example:
docker-compose run --rm web rails console
- runs the rails consoledocker-compose run --rm web bash
- runs the shell
docker-compose run --rm web rspec
- run rpsec tests. Alternatively, open a bash prompt (see above) and runrspec
.
docker-compose run --rm web rake db:setup
- Set up and seed database.- NOTE: the
host
value must be set topostgres
to work with docker docker-compose run --rm web rake sample_data:add
- to add all sample data to the database. Sample data is also split into groups, so if you just want users you can runrake sample_data:add_users
. See lib/tasks/sample/add_sample_data.rake for all availablesample_data
tasks.
docker attach astronomania-api_web_1
- attach to container stdin/out using the id from the above step.crtl p ctrl q
to exit debugging without stopping the container.
- Deployments to staging are automaticly made from the master branch.
- Deployment to production and performed via Heroku pipeline promotion mechanism.
- Background job processing is handled via
sidekiq
- Jobs are started by sending
POST
request to/admin/jobs
with thejob_type
in the payload. These requests must be authenticated by an Admin user. - Jobs are scheduled using AWS CloudWatch events and AWS Lambda. Lambda functions are kept in /aws_lambda_functions.