Deploy Ruby on Rails web app (with MySql) to run on Docker (Linux) in Window 10 & Visual Studio Code

preview_player
Показать описание
References

Prerequisite:
- Docker Desktop (to create Docker image and container which follows DockerFile)
- Visual Studio Code (to manage docker)
- Git Bash (to run git command)

Outcome:
- Ruby on Rail web app with all its dependencies including MySql installed in Linux Docker container.

Key Benefits:
- Reduce deployment time with container and automation (through scripts).
- Reduce testing time. Testing will be always the same expected environment.
- Flexibility. Deployment can be done in any OS or databases, any version.

Commands:
- mkdir notes
- cd notes
- docker-compose run app rails new . --force --database=mysql --skip-bundle
- docker-compose build
- docker-compose run --rm app rake db:migrate
- docker-compose up
Рекомендации по теме