aboutsummaryrefslogtreecommitdiff
path: root/Readme.textile
blob: 23bb3f002a963cc9739be4c152333f4589c34cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
h1. DRuM: The Docker Ruby Manager

p. This is a TERRIBLE alternative to RVM, that uses docker, because why not. You need to be root or have sudo or be in the docker group, because docker.

h2. Example

bc.. cd example
drum bass
drum kick
drum roll -- -p80:80
drum snare

h2. Bass Drums

p. Just a ruby image of some form. By default, ruby:alpine.

bc.. drum bass          # ruby:alpine
drum bass slim     # Just a tag, ruby:slim
drum bass jruby:   # Just an image, jruby:latest
drum bass ruby:2.6 # Image and tag, ruby:2.6

h2. Kick Drums

p. A Kick Drum is a Bass Drum with your gems installed.

bc. drum kick

h2. Drum Rolls

p. This beats on the Kick Drum with your current directory mounted as a volume. For dev.

bc.. drum roll
drum roll -- -p80:80

h2. Snare Drums

p. A Snare Drum is a Kick Drum with your application fully installed, ready for deployment to production.

bc. drum snare

h2. Drum Stick

p. A Drum Stick is how you beat on the Drum. You needn't actually specify the Drum Stick, drum tries to be clever.

h3. Stick selection

p. Drum will try the following sticks in order, and use the first that matches.

# Is there a manually specified stick?
# Is it a rails app? (Run rails server)
# Is there an executable file with the same name as the working directory?
# Is there only one executable .rb file?
# Is there only one file that looks like "entrypoint"
# Is there only one executable file?

h3. Manual Stick

bc. drum stick ./example.rb
drum stick ruby example.rb
drum stick rails server
drum stick                 # Returns what drum will use as the stick