what's cooking in the hack club kitchen 🔥
check out CONTRIBUTING.md for a more detailed guide on how to get up and running with this repo!
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/lintif its giving you a file not found error and you are on windows, try running these commands. They switch line endings to lf (linux) ones
This will reset all your code!
git config --local core.autocrlf false
git rm --cached -r .
git reset --hard
weirdo, 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
We deploy to Coolify using Docker. Both the web and worker services use the same Dockerfile.
Just run it-- the entrypoint should trigger
./bin/thrust ./bin/rails server
In the worker resource's General tab, add this to Custom Docker Options:
--entrypoint "./bin/rails solid_queue:start"