Your Rails 8.2 application is now fully containerized with:
- Web Application (
activerabbit-web-1) - Rails server on port 3000 - Background Jobs (
activerabbit-sidekiq-1) - Sidekiq worker - Database (
activerabbit-db-1) - PostgreSQL 15 on port 5432 - Cache/Jobs (
activerabbit-redis-1) - Redis on port 6380
Dockerfile.dev- Development-optimized containerdocker-compose.yml- Main service definitionsdocker-compose.override.yml- Development overrides.dockerignore- Optimized build contextinit.sql- Database initialization.env- Environment variables for Docker
./bin/docker-setup- First-time setup./bin/docker-dev- Start development environment./bin/docker-console- Rails console in Docker./bin/docker-reset- Reset everything (destructive)
# Full setup (first time)
./bin/docker-setup
# Start all services
docker-compose up
# Start in background
docker-compose up -d# View running containers
docker-compose ps
# View logs
docker-compose logs -f web
docker-compose logs -f sidekiq# Rails console
./bin/docker-console
# Run migrations
docker-compose exec web bundle exec rails db:migrate
# Install new gems
docker-compose run --rm web bundle install
docker-compose build # Rebuild after gem changes- Main Application: http://localhost:3000
- Sidekiq Dashboard: http://localhost:3000/sidekiq
- Database: localhost:5432 (postgres/password)
- Redis: localhost:6380
All containers are healthy and running:
NAME STATUS PORTS
activerabbit-web-1 Up (healthy) 0.0.0.0:3000->3000/tcp
activerabbit-sidekiq-1 Up 3000/tcp
activerabbit-db-1 Up (healthy) 0.0.0.0:5432->5432/tcp
activerabbit-redis-1 Up (healthy) 0.0.0.0:6380->6379/tcp
- ✅ Rails Application serving on port 3000
- ✅ Database migrations completed
- ✅ Tailwind CSS compiled and ready
- ✅ Sidekiq processing background jobs
- ✅ Devise authentication ready for users
- ✅ Pay gem configured for Stripe
- ✅ Rack::Attack protecting against abuse
- ✅ Volume persistence for database and cache
- ✅ Live reloading for development
- ✅ Health checks for all services
- Visit the application: http://localhost:3000
- Create a user account to test authentication
- Add your Stripe keys to
.envfor payment testing - Check Sidekiq dashboard: http://localhost:3000/sidekiq
- Start building your features!
# Daily development
docker-compose up -d # Start everything
# ... develop your app ...
docker-compose down # Stop when done
# When you add gems
# 1. Update Gemfile
# 2. docker-compose run --rm web bundle install
# 3. docker-compose build
# 4. docker-compose up
# Database changes
docker-compose exec web bundle exec rails db:migrate
# View logs
docker-compose logs -f web# Check logs
docker-compose logs web
# Rebuild containers
docker-compose build --no-cache
docker-compose up# Reset database
docker-compose exec web bundle exec rails db:drop db:create db:migrate
# Connect directly to PostgreSQL
docker-compose exec db psql -U postgres -d activerabbit_development# Check what's using ports
lsof -i :3000
lsof -i :5432
lsof -i :6380
# Stop conflicting services or change ports in docker-compose.ymlYour Rails application is now fully containerized and ready for development! 🎉