Skip to content

Commit 9c9745c

Browse files
committed
Improve docker setup
1 parent 939c67f commit 9c9745c

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.1

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Setup через docker, docker-compose и dip
22

3-
- gem install dip
3+
- gem install dip (maybe change .ruby-version file with your ruby ver)
44
- cd .dockerdev
55
- docker-compose build
6+
- For algolia not to brake setup, paste your keys into ALGOLIASEARCH ENVs in .dockerdev/compose.yml
67
- dip provision
78
- docker-compose up
8-
- open localhost:3000
9+
- open localhost:3000 in your browser
10+
11+
After setup you can
12+
- dip bundle - to bundle install after adding gems
13+
- dip setup - to rerun bin/setup
14+
- dip bash - to do any other commands or just to peek around
15+
16+
917

1018
# Задание №4
1119

dip.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ environment:
88
compose:
99
files:
1010
- .dockerdev/compose.yml
11-
project_name: example_demo
11+
project_name: dev_to
1212

1313
interaction:
1414
# This command spins up a Rails container with the required dependencies (such as databases),
@@ -32,6 +32,12 @@ interaction:
3232
command: bundle
3333
compose_run_options: [ no-deps ]
3434

35+
setup:
36+
description: Run bin/setup
37+
service: rails
38+
command: bin/setup
39+
compose_run_options: [ no-deps ]
40+
3541
# A shortcut to run RSpec (which overrides the RAILS_ENV)
3642
rspec:
3743
description: Run RSpec commands
@@ -72,3 +78,4 @@ provision:
7278
- dip compose down --volumes
7379
- dip compose up -d postgres redis
7480
- dip bash -c bin/setup
81+

0 commit comments

Comments
 (0)