Skip to content

Commit 13cf548

Browse files
committed
Add yaichi for better experience
1 parent 322e434 commit 13cf548

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ $ docker-compose run backend bundle exec rake db:create
2323

2424
# Start
2525
$ 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
2734
```
2835

2936
## Motivation

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
version: '3'
22
services:
33
db:
4+
container_name: postgres
45
image: postgres:11
56
volumes:
67
- ./tmp/db:/var/lib/postgresql/data
78
backend:
9+
container_name: backend
810
build: ./backend
911
command: bundle exec rails s -p 3000 -b '0.0.0.0'
1012
volumes:
@@ -14,6 +16,7 @@ services:
1416
depends_on:
1517
- db
1618
frontend:
19+
container_name: frontend
1720
image: "node:14-alpine"
1821
user: "node"
1922
working_dir: /myapp/frontend
@@ -24,3 +27,10 @@ services:
2427
command: "yarn start"
2528
depends_on:
2629
- 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

0 commit comments

Comments
 (0)