UNPKG

1.04 kBMarkdownView Raw
1# Ruby Getting Started
2
3## Set up your environment
4
5Get the project:
6
7```
8git clone https://github.com/heroku/ruby-getting-started
9cd https://github.com/heroku/ruby-getting-started
10```
11
12Ensure that you can connect to Docker in this shell:
13
14```
15docker ps
16```
17
18## Create a Dockerfile
19
20```
21heroku docker:init
22```
23
24Heroku-Docker will automatically detect that this project is a Ruby app.
25
26## Work locally with Docker
27
28At this point, you have several available commands.
29
30For example,
31you could immediately build the project in Docker and release it to Heroku:
32
33```
34heroku create
35heroku addons:add heroku-postgresql
36heroku docker:release
37heroku run bundle exec rake db:migrate
38heroku open
39```
40
41You can also run the server locally in a Dockerized version of Heroku's
42Cedar-14 stack:
43
44```
45heroku docker:start
46heroku docker:open
47```
48
49Finally, you could open a shell in Docker to manipulate the project with
50commands like `bundle install`:
51
52```
53heroku docker:exec bash
54```
55
56...or run such commands directly:
57
58```
59heroku docker:exec bundle install
60```