what's cooking in the hack club kitchen 🔥
me and the homies love docker, and it makes it stupid simple, so its highly recommended to use docker to make your life easier.
-
clone it (duh)
-
you most likely want a database here, so you can run that with this:
docker-compose up -d db
-
now to start cookin, run this and it will boot up rails
docker-compose run --service-ports web /bin/bash
-
now to really turn on the stove, run this (wait a few seconds for stuff to load) and point your browser to
http://localhost:3000bin/dev
-
pull out some instant ramen
random commands you might need
if you just need to run a command once (eg test migrations or whatever) here is how
docker-compose run web bin/rails db:migrate # please dont do this if you are hooked up to prod
docker-compose run web bin/rails bundle install
docker-compose run web bin/lintweirdo, but okay, you gotta figure out how to get postgres running yourself bucko
-
double check your
.envfile to make sure its pointed at your database -
setup the db
bin/rails db:prepare
-
start the dev server
bin/dev
-
have a fire extinguisher at the ready