diff --git a/Dockerfile b/Dockerfile index 85ac6d0..f302cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile ARG RUBY_VERSION=3.3.4 -FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base +FROM ruby:$RUBY_VERSION-slim as base # Rails app lives here WORKDIR /rails diff --git a/Dockerfile.development b/Dockerfile.development index 2405d8d..60c0962 100644 --- a/Dockerfile.development +++ b/Dockerfile.development @@ -2,7 +2,7 @@ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile ARG RUBY_VERSION=3.3.4 -FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base +FROM ruby:$RUBY_VERSION-slim as base # Rails app lives here WORKDIR /rails diff --git a/README.md b/README.md index e7e621e..8d95b17 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,22 @@ The software is still a work in progress. Expect huge variations. I suggest you to use [asdf](https://asdf-vm.com/) Install ruby 3.3.4 +Start the needed services with docker compose: + +``` +docker compose up -d +``` + Create the database and seeds: ``` -bundle exec rails db:create db:migrate db:seed +bin/rails db:create db:migrate db:seed ``` To run the server: ``` -bundle exec rails s +bin/rails s ``` You an reach the app at https://localhost:3000 @@ -27,7 +33,14 @@ You an reach the app at https://localhost:3000 Run: ``` -bundle exec rails test +# application tests +bin/rails test + +# system tests (E2E) +bin/rails test:system + +# all +bin/rails test:all ``` ## Lint @@ -39,4 +52,34 @@ Run: ``` bundle exec rubocop bundle exec htmlbeautifier filename -``` \ No newline at end of file +``` + +## Deploy + +We use [kamal](https://github.com/basecamp/kamal) for deploying. + +Copy the `.env` file: + +``` +cp .env.example .env +``` + +Configure your env variables. + +The first time (after having configured you server), run: + +``` +bundle exec kamal setup +``` + +For pushing envs or changing those, run: + +``` +bundle exec kamal env push +``` + +Then: + +``` +bundle exec kamal deploy +``` diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 98953d9..b310e4c 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,2 +1 @@ -