A base Rails 5.2 application for tutorials at chrisblunt.com and plymouthsoftware.com
1.4K
This is a demo base Rails 5.2 application used for tutorials at https://www.chrisblunt.com/ and https://plymouthsoftware.com/.
It contains:
Post and User models.avatar on User model)PublishAllJob)$ docker run -e RAILS_ENV=development -e DATABASE_URL=postgres://postgres:password@db:5432/my_app_development --link db:db --rm -it --publish 3000:3000 cblunt/rails-basic-app
$ docker run -d -it --name db -e POSTGRES_DB=my_app_development -e POSTGRES_PASSWORD=password postgres
$ docker run -d -it --name redis redis
$ docker run -e RAILS_ENV=development -e DATABASE_URL=postgres://postgres:password@db:5432/my_app_development --link db --rm -it cblunt/rails-basic-app bin/rails db:migrate
$ docker run -e RAILS_ENV=development -e REDIS_URL=redis://redis:6379 -e DATABASE_URL=postgres://postgres:password@db:5432/my_app_development --link db --link redis --rm -it --publish 3000:3000 cblunt/rails-basic-app
sidekiq command:$ docker run -d --name sidekiq -e RAILS_ENV=development -e DATABASE_URL=postgres://postgres:password@db:5432/my_app_development -e REDIS_URL=redis://redis:6379 --link db --link redis --rm -it cblunt/rails-basic-app bundle exec sidekiq
This docker-compose.yml can be used to configure the containers:
version: '3'
services:
db:
image: postgres:10
environment:
- POSTGRES_DB=my_app_development
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret123
web:
image: cblunt/rails-basic-app
environment:
DATABASE_URL: postgres://postgres:secret123@db:5432/my_app_development
RAILS_ENV: development
REDIS_URL: redis://redis:6379
ports:
- '3000:3000'
depends_on:
- db
worker:
image: cblunt/rails-basic-app
environment:
DATABASE_URL: postgres://postgres:secret123@db:5432/my_app_development
RAILS_ENV: development
REDIS_URL: redis://redis:6379
command: bundle exec sidekiq
depends_on:
- db
- redis
redis:
image: redis
Content type
Image
Digest
Size
121.3 MB
Last updated
over 7 years ago
docker pull cblunt/rails-basic-app