Skip to content

Using this repository you can create a new rails project with docker

License

Notifications You must be signed in to change notification settings

DubAvenXP/rails-docker-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails projects generator using Docker

This is a simple way to generate a Rails project using Docker.

Requirements

You need to have Docker installed on your machine.

Usage

$ docker-compose run --no-deps web rails new . --force --database=postgresql --api
$ docker-compose build
$ docker-compose up
$ docker-compose run web rake db:create
$ docker-compose run web rake db:migrate

Add permissions to the directory

$ sudo chown -R $(whoami):$(id -gn) .

Tips

  • If you want to use a different database, you can change the database option in the docker-compose.yaml file.
  • If you want to use a different Ruby version, you can change the image option in the docker-compose.yaml file and also the version in the Gemfile.
  • If you want to use a different Rails version, you can change the version in the Gemfile.

Files

  • Dockerfile: Defines the image to be used to build the container.

  • docker-compose.yml: Defines the services to be used to build the container.

  • Gemfile: With the gems to be used in the project.

  • Gemfile.lock: Defines the gems to be used in the project.

  • entrypoint.sh: Defines the commands to be executed when the container is started.

  • .dockerignore: Defines the files to be ignored when building the container.

Contributing

Bug reports and pull requests are welcome

About

Using this repository you can create a new rails project with docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published