4 ms·
A demo/playground in the readme would be very helpful
by willsmith72 1y ago
A demo/playground in the readme would be very helpful
- sbarre 1y agoThere's a Dockerfile and instructions on how to build it.
- nomilk 1y agohmm.. not really. The dockerfile is for production, and to run locally in dev requires manual installation of ruby and redis, for someone without ruby installed this could easily be ~1h. (glad for any corrections) 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).
- wltr 1y agoI installed it with docker, it was easy. I haven’t tested it in a real deployment with real users, but I could easily test it myself, starting the server from my laptop. 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.
- rcarmo 1y agoWith Colima, all the above worked for me on a Mac.