Shows an implementation of GraphQL via graphql-ruby.
- Try it on heroku.
- Schema is defined in
/app/graph
. - Queries are served by
queries#create
. - GraphiQL IDE is served by graphiql-rails
The docker-compose.yaml
file contains all of the docker config required to build, and run the database, and web containers for this rails app. It also mounts the local development directory onto the container and will reload the application if anything changes.
# this will build the image (including all gems, and debugging tools like psql)
docker-compose build
# this will start up postgres db, and the web container (PUMA, rails, graphql)
# this will also generate the corresponding migrations
docker-compose up
# seed information into the db by running rake db:seed in the web container
docker-compose exec web rake db:seed
# in other terminal window run the following run bash commands in the web container
# this can be used to install gems, and other stuff
docker-compose exec web
# build image
docker-compose -f docker-compose.production.yaml build
# run production containers
docker-compose -f docker-compose.production.yaml up
- ruby live-reload for development
- add better configurations