-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (50 loc) · 1.1 KB
/
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
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
environment:
TZ: Asia/Tokyo
develop:
watch:
- action: sync
path: ./frontend
target: /app/
- action: rebuild
path: ./package.json
volumes:
- front_node_modules:/app/node_modules
command: npm run dev -- -p 4000
ports:
- '4000:4000'
backend:
build:
context: ./backend
dockerfile: Dockerfile
environment:
RAILS_ENV: development
TZ: Asia/Tokyo
POSTGRES_USER: ${USER_NAME}
POSTGRES_PASSWORD: ${USER_PASS}
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -b '0.0.0.0'"
volumes:
- ./backend:/app
depends_on:
- db
ports:
- '3000:3000'
tty: true
stdin_open: true
db:
image: postgres:17.2
environment:
POSTGRES_USER: ${USER_NAME}
POSTGRES_PASSWORD: ${USER_PASS}
POSTGRES_DB: app_development
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
front_node_modules:
postgres_data: