The main goal is to provide Rails 7 application with working user registration and authentication (Devise) and TailwindCSS dark theme.
The rails template comes preconfigured with:
Start the development environment:
docker-compose up
The following services are configured in docker-compose.yml:
web
from Dockerfile image running rails server
exposing web application on host at http://localhost:3000css
from Dockerfile image running rails tailwindcss:watch
compiling TailwindCSS stylesheetspostgres
from posgres imageCreate development
and test
databases:
docker-compose exec web rails db:create
Load the database schema:
docker-compose exec web rails db:schema:load
Run unit tests:
docker-compose exec web rails test
Run system tests:
docker-compose exec web rails test:system
Build production docker image for deployment:
docker build -f production.Dockerfile -t rails-auth-production .
Test production image locally:
docker run -p 3000:3000 --name rails-auth-production --rm -e DATABASE_URL=postgres://rails_auth_production:[email protected]/rails_auth_production rails-auth-production
docker exec rails-auth-production rails db:schema:load
ngrok http 3000