The quickest way for a non-rubyist that I can think of would be:
- Install rbenv
- Use rbenv to install ruby 3.4.5
- Install and start redis
- Clone campfire repo, run the two lines in the readme: bin/rails setup && bin/rails server
- go to http://localhost:3000
Note: depending on your OS sometimes installing rbenv and ruby require a few other dependencies to be installed. E.g. ruby-build on macOS, which is easily installed with homebrew.
Would be awesome if the dockerfile could be harnessed so it could be used in development, not just production, so all the above steps would be unnecessary. (this would make it easy for non-rubyists to demo rails apps generally, not just for campfire but all apps that we want to allow others to run locally and play around with).
You clone the GitHub link, then `cd` there and run docker:
docker build -t campfire .
docker run \
--publish 3000:3000 \
--volume campfire:/rails/storage \
--env SECRET_KEY_BASE=$(docker run --rm campfire bin/rails secret) \
--env DISABLE_SSL=1 \
campfire
Before that, you need to add yourself to docker group (and reboot): sudo usermod -aG docker $USER
Otherwise, the command fail as it needs sudo rights for generating a secret. Or you could generate the secret before that: sudo docker run --rm campfire bin/rails secret
And then insert the long string into your command, after `SECRET_KEY_BASE=`.I did all that on Linux, so I have no idea how to do that on macOS.
As a final step, you visit either localhost:3000 or ip-addr:3000 and play with the chat.