-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1016 Bytes
/
docker-compose.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
version: "3.7"
services:
db:
image: postgres:13
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mydatabase
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
api:
build:
context: ./back/
dockerfile: Dockerfile
working_dir: /myapp/back
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/myapp
- ./vendor/bundle:/myapp/back/vendor/bundle
environment:
TZ: Asia/Tokyo
RAILS_ENV: development
ports:
- "3000:3000"
depends_on:
- db
stdin_open: true
tty: true
env_file:
- ./settings/back.env
front:
build:
context: ./front/
dockerfile: Dockerfile
volumes:
- ./front/app:/usr/src/app
command: sh -c "npm install && npm run dev"
ports:
- "8000:3000"
stdin_open: true
tty: true
env_file:
- ./settings/front.env
volumes:
pgdata: