dawarich/README.md
2023-05-28 12:52:13 +02:00

1.2 KiB

SoloCustomerTemplate

This is a Rails 7.0.2.3 app template with test suite, user auth and development docker env.

How to rename the app

Run

ruby rename_app.rb old_app_name new_app_name

Notice, the name must be in snake_case. Default app name is solo_customer_template.

How to start the app locally

  1. Install and start Docker
  2. make build to build docker image and install all the dependencies (up to 5-10 mins)
  3. make setup to install gems, setup database and create test records
  4. make start to start the app

Press Ctrl+C to stop the app.

Dockerized with https://betterprogramming.pub/rails-6-development-with-docker-55437314a1ad

Deployment (1st time)

  1. Set variables in Homelab repo
  2. make dokku_new_app
  3. make dokku_setup_backups
  4. make dokku_add_domain
  5. Create certificates files in Homelab repo
  6. make dokku_add_ssl
  7. Set SSL/TLS mode to Full in Cloudflare
  8. git remote add dokku dokku@DOKKU_SERVER_UP:APP_NAME
  9. git push dokku master
  10. Add app.json to the repo:
  {
    "scripts": {
      "predeploy": "dokku ps:stop solo_customer_template"
    },
    "formation": {
      "web": {
        "quantity": 1
      },
      "worker": {
        "quantity": 1
      }
    }
  }