Skip to content

mantecajc/docker-ruby-on-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1º Clone this repository.

git clone https://github.com/mantecajc/docker-ruby-on-rails.git PROJECT_NAME

2º Give a project name in .env file (and in .docker/Dockerfile). Please avoid blanks !

3º Run docker-compose from the directory containing the docker-compose.yml file:

docker-compose run --no-deps webserver rails new . --force --database=postgresql

For a quick Rails install, use the --minimal flag.

docker-compose run --no-deps webserver rails new . --minimal --force --database=postgresql

You should now have a Rails project in the app directory.

4º Copy & paste .docker/example.database.yml on config/database.yml.

5º Builds project images & boots up the app.

docker-compose build
docker-compose up

7º Create database & run migrations.

docker-compose run webserver rake db:create
docker-compose run webserver rake db:migrate

Your Rails app is available at http://localhost:3000/

8º Disconnect your local repo from the remote:

git remote rm origin

About

Using Docker for deploying a Ruby on Rails application from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors