Your characters, organized. Let Refsheet help you commission, share, and socialize
Refsheet is a place for character and world builders to attach assets related to their characters in one unified format, allowing artists and story writers to access the specific details of a character, maintaining synchronized dynamic canon.
This app is now Dockerized. Install Docker and docker-compose
to get going.
A note on starting up the website in development mode: docker-compose up
will start the worker and the website at
the same time, which is awesome if you want to run migrations twice on top of each other (Rails doesn't like this).
To start it up and keep the website logs in the foreground:
docker-compose start postgres
docker-compose start redis
docker-compose start worker
docker-compose up website
For your convenience, this has been summed up in bin/start-dev
. I recommend adding ./bin
to your $PATH
:
echo 'export PATH="$PATH:./bin"' >> ~/.bashrc
Since commands should be run in Docker, there is a helper in bin/r
which can be used to run commands against the
website
container. The following are equivalent:
# "Run Bundle"
bin/rb rake db:migrate
# "Run"
bin/r bundle exec rake db:migrate
# Both same as:
docker-compose run website bundle exec rake db:migrate
# If you adjusted your PATH to include ./bin
rb rake db:migrate
You might need to create a database for something useful to happen. Rake does this:
bin/r rake db:setup RAILS_ENV=development
bin/r rake db:create RAILS_ENV=test
Google Cloud Build handles testing and deploy to Kubernetes. If you want to test things
locally, swell! Uh, run rspec
against the project. Or, use an IDE
like RubyMine, it'll do this for you. Specs live in ./specs
.
bin/r rspec
bin/r yarn run karma
Javascript code is made prettier by Prettier. Your checks will fail in CI if you change Javascript code and it isn't pretty enough. Before you commit:
bin/r yarn run prettier
A few custom Rake and Yarn Run tasks exist to make life a bit better.
rake api:generate
- Regenerate Swagger docs from API changesrake kube:update_config
- Apply config changes in .kubernetes folderrake sitemap:refresh
- Regenerate sitemap files and ping search engines
yarn run test
- Run Karma specsyarn run prettier
- Do this before committingyarn run eslint
- Check for javascript code errorsbin/update-apollo-fragments.js
- Update Apollo (graphql) code fragments config, used if unions change
This project is built and maintained by Mau, and you can reach them at @refsheet on Twitter.
- Translations: locize.io
- CI / CD: Google Cloud Build
- Monitoring: Stackdriver Monitoring
- Logs: Stackdriver Logging
- Infrastructure: Google Kubernetes Engine
- Error Reporting: Sentry
- Production: Refsheet.net
- Staging: kube.Refsheet.net
I would like to thank the bits, and bytes, and copper and fiber wires that made transmitting the commit containing this thank you message possible.
I would also like to thank #devfurs for being good little rubber ducks.