-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
41 lines (41 loc) · 923 Bytes
/
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
version: '3'
services:
db:
image: postgres
restart: always
environment:
TZ: Asia/Tokyo
POSTGRES_PASSWORD: password
volumes:
- postgresql_data:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -d myapp_development -U postgres"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: .
dockerfile: Dockerfile.dev
command: bash -c "bundle install && bundle exec rails db:prepare && rm -f tmp/pids/server.pid && ./bin/dev"
tty: true
stdin_open: true
volumes:
- .:/myapp
- bundle_data:/usr/local/bundle:cached
- node_modules:/myapp/node_modules
environment:
TZ: Asia/Tokyo
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
env_file:
- .env
volumes:
bundle_data:
postgresql_data:
node_modules: