forked from rootstrap/rails_api_base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (38 loc) · 850 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
version: '3.0'
services:
web:
build: .
entrypoint: >
bash -c "
rm -f tmp/pids/server.pid
&& bundle exec rails s -b 0.0.0.0 -p 3000"
ports:
- ${RAILS_PORT-3000}:3000
environment:
POSTGRES_USER: ${POSTGRES_USER-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD-postgres}
POSTGRES_HOST: db
volumes:
- .:/src/myapp
depends_on:
- db
links:
- db:db
db:
image: postgres:15
environment:
POSTGRES_USER: ${POSTGRES_USER-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD-postgres}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- ${POSTGRES_PORT-5432}:5432
js:
build: .
entrypoint: yarn build --watch
volumes:
- .:/src/myapp
- node_modules:/src/myapp/node_modules
volumes:
db_data:
node_modules: