added Dockerfile and docker-compose.yml

This commit is contained in:
Daniel
2017-11-14 04:33:05 -06:00
parent bd30862a78
commit 3e42182551
4 changed files with 72 additions and 4 deletions

28
docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
# service configuration for our database
database:
# use the preferred version of the official Postgres image
# see https://hub.docker.com/_/postgres/
image: postgres:9.4.5
# persist the database between containers by storing it in a volume
volumes:
- docker-example-postgres:/var/lib/postgresql/data
# service configuration for our dockerized Rails app
app:
# use the Dockerfile next to this file
build: .
# rely on the RAILS_ENV value of the host machine
# environment:
#RAILS_ENV: $RAILS_ENV
# makes the app container aware of the DB container
links:
- database
# expose the port we configured Unicorn to bind to
ports:
- "3000:3000"