More Premium Hugo Themes Premium React Themes

Docker Rails React Starter

A basic docker-compose, Rails and React / Webpack starter kit

Docker Rails React Starter

A basic docker-compose, Rails and React / Webpack starter kit

Author Avatar Theme by adaam2
Github Stars Github Stars: 50
Last Commit Last Commit: Jan 23, 2020 -
First Commit Created: Jan 15, 2024 -
Docker Rails React Starter screenshot

Overview:

This product is an application built using multiple technologies such as Docker, Postgresql, Nginx proxy, Ruby on Rails 5 (API only), and React + Redux + Redux Thunk + Reselect. It allows users to run and manage the application easily.

Features:

  • Docker Compose integration
  • Postgresql database support
  • Nginx proxy for streamlined access
  • Ruby on Rails backend API
  • React + Redux frontend with Redux Thunk and Reselect
  • Sidekiq integration for background tasks

Installation:

To install the theme, follow these steps:

  1. Create the database and run migrations:

    docker-compose run backend rails db:create
    docker-compose run backend rails db:migrate
    
  2. Alternatively, log in via bash and run the commands there:

    docker-compose run backend bash
    rails db:create
    rails db:migrate
    exit
    
  3. If you are using Docker for Mac, set up the directory /Users to be bind mounted into Docker containers:

    • Go to Docker for Mac preferences
    • Open the File Sharing tab
    • Add /Users to the list of shared directories
  4. Run the application:

    docker-compose up
    
  5. Access the application in your browser at http://localhost:8080

  6. To install new Yarn/NPM packages in the React container, access the bash console for the React container:

    docker-compose exec frontend bash
    
  7. To access the bash console for the Rails app and run rails c:

    docker-compose exec backend bash
    
  8. To create the database:

    docker-compose exec backend rails db:create
    
  9. To run migrations:

    docker-compose exec backend rails db:migrate
    
  10. To stop and remove the application:

    docker-compose down -v
    
  11. To run backend RSpec tests:

    docker-compose exec backend rspec
    
  12. To run Jest (JS) specs:

    docker-compose exec frontend yarn test
    

Summary:

This product is a multi-technology application that utilizes Docker, Postgresql, Nginx proxy, Ruby on Rails, and React + Redux. It provides an easy installation process and allows for easy management of the application. Users can run the application, perform database operations, access the bash consoles for each component, and run tests. The application architecture is built using Docker Compose, with separate containers for the various services. The Nginx proxy container is responsible for combining the services and exposing ports for access. The product also provides recommended dependency versions for Docker Compose, Docker, and Ruby.