Giter Site home page Giter Site logo

carpitan's Introduction

๐ŸŽ‰ Carpitan

For political accountability and power to the people.

Requirements

You'll need the following installed to run the template successfully:

  • Ruby 3.2+
  • Node.js v20+
  • PostgreSQL 12+
  • Redis - For ActionCable support (and Sidekiq, caching, etc)
  • Libvips or Imagemagick - brew install vips imagemagick
  • Overmind or Foreman - brew install tmux overmind or gem install foreman - helps run all your processes in development

Then you can start the database servers:

brew services start postgresql
brew services start redis

Initial Setup

First, clone the app

git clone [email protected]:kaka-ruto/carpitan.git
cd carpitan

Run bin/setup to install Ruby and JavaScript dependencies and setup your database.

bin/setup

Running Carpitan

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.

Running on Windows

See the Installation docs

Running with Docker or Docker Compose (With Jumpstart)

See the Installation docs

Running with Docker or Docker Compose (Without Jumpstart)

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).

Prerequisites

Before you start, make sure you have the following installed on your machine:

  • Docker
  • Docker Compose

1. Configure Environment Variables

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

2. Build and Start the Containers

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.

3. Access the Application

Once the containers are up and running, you can access the Rails application in your web browser at:

http://localhost:3000

Contributing

We'd love to receive contributions!

If you have an improvement you'd like to share

  1. Create a fork of the repository
  2. Make the change
  3. Test the change
  4. Send us a pull request.

carpitan's People

Contributors

kaka-ruto avatar muokicaleb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.