-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathdocker-compose.development.yml
54 lines (51 loc) · 1 KB
/
docker-compose.development.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
51
52
53
54
version: '3'
services:
postgres:
environment:
- POSTGRES_PASSWORD=root
image: postgres
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
redis:
image: redis
ports:
- 6379:6379
volumes:
- redis:/data
app:
tty: true
stdin_open: true
build:
context: .
dockerfile: Dockerfile.dev
env_file: .env
ports:
- "3000:3000"
environment:
- RAILS_LOG_TO_STDOUT=true
- RAILS_ENV=development
- PGHOST=postgres
- REDIS_URL=redis://redis:6379
volumes:
- bundle_cache:/usr/local/bundle
- .:/app
depends_on:
- postgres
- redis
command: >
/bin/bash -c "
cp config/database.yml.sample config/database.yml;
while ! nc -z postgres 5432;
do
echo Waiting for PG;
sleep 1;
done;
rake db:setup;
rm -f /app/tmp/pids/server.pid;
foreman start;"
volumes:
bundle_cache:
postgres:
redis: