brandonmenc / my_rails_app

Starting point for Rails development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A starting point for Rails development.

Instructions

You'll probably want to clone the app and rename it:

./clone ~/src/new_app

This will clone the repo locally with git into the directory ~/src/new_app and it will rename the app new_app. It will also create two branches: parent and master, with master branching off of parent. Do all of your work in master as you normally would. Pull changes from the template into parent and rebase master on parent as needed.

First time run:

make

This will build everything and start it up. After this initial build, you can start and stop at will:

make stop
make start

The application code is mounted into the container from your local machine so you don't need to rebuild the docker image every time you make a change, but if you want to rebuild the docker image:

make build
make restart

If you install new gems:

make bundle-install

or npm packages:

make yarn-install

Drop the db and recreate it:

make db-drop
make db-create

Get a Rails console:

make console

Log into a shell:

make login

If you messed everything up and need to remake everything from scratch:

make nuke
make

Overriding ports and other environment variables

Look in .env

MailCatcher

The app is configured to send all emails in development mode through an instance of MailCatcher that is started along with the application when using docker-compose or the Makefile.

You can visit http://localhost:1080 to view the emails.

TODO

Upgrade to Ruby 3

Anycable doesn't work out of the box with Ruby 3 because protobufs needs to be built from source. See this.

About

Starting point for Rails development


Languages

Language:Ruby 74.3%Language:HTML 9.9%Language:JavaScript 7.1%Language:Makefile 3.1%Language:Shell 2.7%Language:Dockerfile 1.6%Language:CSS 1.2%Language:SCSS 0.2%