Gallery is a website for showcasing photos taken at Hack Club events, hackathons and meetings. It uses the Ruby on Rails framework and the Hack Club theme.
You'll need the following installed:
- Git
- Ruby
- Ruby on Rails
- Clone the repository by running the following in your terminal
git clone https://github.com/phthallo/gallery cd gallery
- Install the project's dependencies. If you run into any errors, manually install the gem that's causing errors using
gem install <package>
bundle install
- Set up the database.
If you're (particularly Windows users) getting errors , try running
rails db:prepare
bin/rails
orruby bin/rails
instead ofrails
! - Start the server.
To specify a port, append
rails server
-p <port>
onto the above command.
A version of this website is currently running at https://gallery.phthallo.hackclub.app, using Hack Club's Nest hosting. It uses Systemd to stay online.
The ExecStart=
parameter references gallery_start.sh
Edit it to fit your setup - make sure to run nest get_port
to check for free ports! Fill out the rest of the file as directed.
After running nest subdomain add <subdomain>
(if applicable), edit the contents of your Caddyfile. The parts relevant to this project are below:
http://<subdomain.<username>.hackclub.app {
bind unix/.webserver.sock|777
root * /home/<username>/<path>/<to>/gallery
# Add your Caddy directives here!
file_server {
hide .get .env
}
reverse_proxy :<port> {
header_up X-Forwarded-Proto https
}
}
Reload your Caddyfile and you are good to go!
systemctl --user reload caddy