-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdip.yml
More file actions
152 lines (132 loc) · 3.19 KB
/
dip.yml
File metadata and controls
152 lines (132 loc) · 3.19 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
version: '8.0'
environment:
RAILS_ENV: development
HOST: ${HOST:-lvh.me}
PORT: ${PORT:-3000}
compose:
files:
- docker-compose.yml
project_name: super-valera
interaction:
# === Infrastructure ===
up:
description: Start infrastructure (postgres, redis) in background
runner: docker_compose
compose:
method: up
run_options: [-d, postgres, redis]
down:
description: Stop all services
runner: docker_compose
compose:
method: down
# === Main commands ===
bash:
description: Open bash shell in app container
service: app
compose:
run_options: [no-deps, rm]
dev:
description: Start full dev stack (server + css + bot)
service: app
command: foreman start -f Procfile.docker
compose:
run_options: [service-ports, rm]
rails:
description: Run Rails commands
service: app
command: bundle exec rails
compose:
run_options: [rm]
subcommands:
s:
description: Start Rails server only
service: app
command: bundle exec rails server -b 0.0.0.0
compose:
run_options: [service-ports, rm]
rake:
description: Run Rake tasks
service: app
command: bundle exec rake
compose:
run_options: [rm]
bundle:
description: Run Bundler commands
service: app
command: bundle
compose:
run_options: [rm]
# === Testing and quality ===
test:
description: Run tests
service: app
command: bundle exec rails test
environment:
RAILS_ENV: test
compose:
run_options: [rm]
rubocop:
description: Run RuboCop
service: app
command: bundle exec rubocop
compose:
run_options: [rm]
brakeman:
description: Run security analysis
service: app
command: bundle exec brakeman
compose:
run_options: [rm]
ci:
description: Run full CI suite (tests + rubocop + brakeman)
service: app
command: bin/ci
compose:
run_options: [rm]
# === Telegram Bot ===
bot:
description: Run Telegram bot poller
service: app
command: bundle exec rake telegram:bot:poller
compose:
run_options: [rm]
# === Database ===
console:
description: Run Rails console
service: app
command: bundle exec rails console
compose:
run_options: [rm]
psql:
description: Run PostgreSQL console
service: postgres
command: psql -U valera -d valera_development
migrate:
description: Run database migrations
service: app
command: bundle exec rails db:migrate
compose:
run_options: [rm]
# === Utilities ===
logs:
description: Tail application logs
service: app
command: tail -f log/development.log
compose:
run_options: [rm]
clean:
description: Clean tmp and cache
service: app
command: bundle exec rails tmp:clear log:clear
compose:
run_options: [rm]
provision:
# Idempotent setup - safe to run repeatedly
- dip compose build
- dip compose up -d postgres redis
# docker compose waits for healthcheck via depends_on: condition: service_healthy
- dip bundle install
- dip rails db:prepare
- echo ""
- echo "Provision complete! Run 'dip dev' to start development"