-
Notifications
You must be signed in to change notification settings - Fork 1
/
dip.yml
92 lines (76 loc) · 1.64 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3.7'
environment:
DOCKER_TLD: localhost
POSTGRES_IMAGE_TAG: 16.1
REDIS_IMAGE_TAG: 7
DOCKER_RUBY_VERSION: 3.2
DOCKER_GO_VERSION: 1.19
RAILS_ENV: development
LOG_LEVEL: debug
RAILS_SERVE_STATIC_FILES:
compose:
files:
- docker/docker-compose.yml
project_name: photo_storage${RAILS_ENV}
interaction:
sh:
service: app
irb:
service: app
command: bundle exec pry
bundle:
service: app
command: bundle
rake:
service: app
command: bundle exec rake
rails:
service: app
command: bundle exec rails
subcommands:
s:
service: web
compose_method: up
cleanup:
service: app
command: rm -rf log/*.log
rspec:
service: app
environment:
RAILS_ENV: test
LOG_LEVEL: warn
command: bundle exec rspec
psql:
service: db
command: psql -h db -U postgres photos
compose_run_options: [no-deps]
go:
service: proxy
command: go
go_sh:
service: proxy
command: sh
go_test:
service: proxy
environment:
RAILS_ENV: test
command: go test -v ./...
proxy_build:
service: proxy-build
command: go build -ldflags '-s -w' proxy_service.go
compose_run_options: [no-deps]
rubocop:
service: app
environment:
RAILS_ENV: test
command: bundle exec ./rubocop
compose_run_options: [no-deps]
provision:
- dip build --pull app
- docker network inspect frontend > /dev/null 2>&1 || docker network create frontend
- docker volume create --name bundler_data
- docker volume create --name ssh_data
- dip cleanup
- dip compose up -d db
- dip bundle install
- dip rails db:migrate