-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
38 lines (33 loc) · 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
# The bundle service is based on the data volume container pattern. More info:
# - https://docs.docker.com/engine/tutorials/dockervolumes/#/creating-and-mounting-a-data-volume-container
# - http://www.offermann.us/2013/12/tiny-docker-pieces-loosely-joined.html
# To debug with binding.pry, run the following in a separate
# bash window:
# run docker-compose attach [web_container_name]
version: '2'
services:
db:
env_file: .env
image: postgres:9.6.1
ports:
- "5433:5432"
bundle:
image: georgianbudget_api
volumes:
- /bundle
command: echo "Loading up bundled gems!"
api:
build: ./
image: georgianbudget_api
command: /bin/sh -c "rm -f tmp/pids/server.pid; bundle exec rails server --port 3000 --binding 0.0.0.0"
ports:
- "3000:3000"
links:
- db
volumes:
- .:/myapp
volumes_from:
- bundle
# enables debugging with binding.pry - commented out because it causes DOCKER_COMPOSE_TIMEOUT issue
# tty: true
stdin_open: true