For political accountability and power to the people.
This project aims to:
You'll need the following installed to run the template successfully:
brew install vips imagemagick
brew install tmux overmind
or gem install foreman
- helps run all your processes in developmentThen you can start the database servers:
brew services start postgresql
brew services start redis
First, clone the app
git clone git@github.com:kaka-ruto/carpitan.git
cd carpitan
Run bin/setup
to install Ruby and JavaScript dependencies and setup your database.
bin/setup
To run your application, you'll use the bin/dev
command:
bin/dev
This starts up Overmind (or Foreman) running the processes defined in Procfile.dev
. We've configured this to run the Rails server, CSS bundling, and JS bundling out of the box. You can add background workers like Sidekiq, the Stripe CLI, etc to have them run at the same time.
See the Installation docs
See the Installation docs
This Docker Compose setup provides a complete environment for running a Rails application with PostgreSQL and Redis. The configuration includes three services: a PostgreSQL database (db
), a Redis instance (redis
), and the Rails web application (web
).
Before you start, make sure you have the following installed on your machine:
Update the environment variables in the docker-compose.yml
file if necessary. Ensure you have set the SECRET_KEY_BASE
for your Rails application and the database credentials:
services:
db:
environment:
POSTGRES_DB: carpitan_production
POSTGRES_USER: carpitan
POSTGRES_PASSWORD: secretpassword
web:
environment:
DATABASE_URL: postgres://carpitan:secretpassword@db/carpitan_production
REDIS_URL: redis://redis:6379/1
RAILS_ENV: production
SECRET_KEY_BASE: your_generated_secret_key_base
ASSUME_SSL: "false"
FORCE_SSL: "false"
You can generate a secret key base using the following Rails command:
rails secret
Build and start the containers using Docker Compose:
docker-compose up --build
This command will build the Docker image for the Rails application and start all the services defined in the docker-compose.yml
file.
Once the containers are up and running, you can access the Rails application in your web browser at:
http://localhost:3000
We'd love to receive contributions!
If you have an improvement you'd like to share