https://github.com/yosriady/docker-rails
Dockerized Rails Application https://docs.docker.com/compose/rails/
https://github.com/yosriady/docker-rails
Last synced: 4 months ago
JSON representation
Dockerized Rails Application https://docs.docker.com/compose/rails/
- Host: GitHub
- URL: https://github.com/yosriady/docker-rails
- Owner: yosriady
- Created: 2015-07-26T03:29:22.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-26T05:53:41.000Z (almost 10 years ago)
- Last Synced: 2025-01-19T11:16:44.989Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
docker-rails
========> This README would normally document whatever steps are necessary to get the
application up and running.## Getting Started
Have **Docker** and **docker-compose** [installed](https://docs.docker.com/compose/install/).
Fork this project, and do a `git clone` from your fork.
```
cd docker-rails
docker-compose up
```If all’s well, you should see some PostgreSQL output, and then—after a few seconds—the familiar refrain:
```
myapp_web_1 | [2014-01-17 17:16:29] INFO WEBrick 1.3.1
myapp_web_1 | [2014-01-17 17:16:29] INFO ruby 2.2.0 (2014-12-25) [x86_64-linux-gnu]
myapp_web_1 | [2014-01-17 17:16:29] INFO WEBrick::HTTPServer#start: pid=1 port=3000
```Finally, you need to create the database. Ctrl-C and run:
```
docker-compose run web rake db:create
```Note that for rails and rake commands, you will need to prefix it with `docker-compose run web ...`
Run `docker-compose up` again and the Rails application should be running at `:3000`, where `` can obtained from `docker inspect ` or `boot2docker ip`.
A normal development workflow is:
- You run `docker-compose up`
- You preview the running rails application
- You make changes to the rails code
- Restart the rails app by re-running `docker-compose up`
- Your newly changed application runs