-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdip.yml
64 lines (51 loc) · 1.5 KB
/
dip.yml
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
62
63
# Required minimum dip version
version: '7.5'
environment:
RAILS_ENV: development
compose:
files:
- docker-compose.yml
- docker-compose.override.yml # platform specific overrides
interaction:
sh:
description: Open a Bash shell within a Rails container (with dependencies up)
command: /bin/bash
service: warner
bash:
description: Run an arbitrary script within a container (or open a shell without deps)
command: /bin/bash
service: warner
bundle:
description: Run Bundler commands
command: bundle
service: warner
rake:
description: Run Rake commands
command: bundle exec rake
service: warner
guard:
description: Run red-green-red refactor loop using guard
environment:
RAILS_ENV: test
command: bundle exec guard
service: warner
rspec:
description: Run Rails tests
environment:
RAILS_ENV: test
command: bundle exec rspec
service: warner
provision:
# Dip requires .env to do anything
- touch .env
# Remove old containers and volumes.
- dip compose down --volumes --remove-orphans
- docker volume create warner-history
- dip compose build
# Install gems
- dip bundle install
# Setup configuration files if they do not (yet) exist
# use `|| true` to fix error when /bin/cp is used (which returns 1 when file exists)
# - cp -n docker-compose.override.yml.example docker-compose.override.yml || true
# - cp -n .env.local.example .env.local || true
# - cp -n .env.example .env || true