File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,14 @@ $ docker-compose run backend bundle exec rake db:create
23
23
24
24
# Start
25
25
$ docker-compose up -d
26
- $ open http://localhost:3000
26
+
27
+ # Open frontend
28
+ $ open http://localhost:80 # You'll see yaichi page
29
+ # or
30
+ $ open http://frontend.localhost
31
+
32
+ # Check backend API
33
+ $ curl -H ' Host: backend.localhost' http://localhost/greetings/hello
27
34
```
28
35
29
36
## Motivation
Original file line number Diff line number Diff line change 1
1
version : ' 3'
2
2
services :
3
3
db :
4
+ container_name : postgres
4
5
image : postgres:11
5
6
volumes :
6
7
- ./tmp/db:/var/lib/postgresql/data
7
8
backend :
9
+ container_name : backend
8
10
build : ./backend
9
11
command : bundle exec rails s -p 3000 -b '0.0.0.0'
10
12
volumes :
@@ -14,6 +16,7 @@ services:
14
16
depends_on :
15
17
- db
16
18
frontend :
19
+ container_name : frontend
17
20
image : " node:14-alpine"
18
21
user : " node"
19
22
working_dir : /myapp/frontend
@@ -24,3 +27,10 @@ services:
24
27
command : " yarn start"
25
28
depends_on :
26
29
- backend
30
+ yaichi :
31
+ container_name : yaichi
32
+ image : mtsmfm/yaichi:1.5.0
33
+ ports :
34
+ - 80:3000
35
+ volumes :
36
+ - /var/run/docker.sock:/var/run/docker.sock
You can’t perform that action at this time.
0 commit comments