This is a demo Rails app showcasing the organizations gem. It's deployed at organizations.rameerez.com.
cd test/dummy
bin/setup
bin/devOpen http://localhost:3000.
The demo app uses Kamal for deployment.
-
Generate the Docker-specific Gemfile.lock:
cd test/dummy BUNDLE_GEMFILE=Gemfile.docker bundle installThis creates
Gemfile.docker.lock. This is necessary because the regularGemfilereferences the gem viagemspec path: "../..", which doesn't exist in Docker's build context. The Docker Gemfile fetches the gem from RubyGems instead. -
Set up deploy config:
cd test/dummy cp config/deploy.yml.example config/deploy.yml # Edit config/deploy.yml with your server IPs, registry, etc.
-
Set up secrets:
cd test/dummy cp .kamal/secrets.example .kamal/secrets # Edit .kamal/secrets with your values
-
Create master key (if not present):
cd test/dummy bin/rails credentials:edit
cd test/dummy
kamal deployWhen you release a new version of the organizations gem to RubyGems, update the demo:
cd test/dummy
BUNDLE_GEMFILE=Gemfile.docker bundle update organizations
kamal deploy- Gemfile vs Gemfile.docker: The regular
Gemfileuses the local gem code for development.Gemfile.dockerfetches from RubyGems for deployment. - No authentication: The demo auto-creates users and uses session-based "impersonation" to switch between them.
- SQLite: Uses SQLite for simplicity. Data persists in a Docker volume.