Skip to content

Instantly share code, notes, and snippets.

@dmitryrck
Last active April 15, 2017 17:24
Show Gist options
  • Save dmitryrck/83a55938f767a17fee7633c3afb34802 to your computer and use it in GitHub Desktop.
Save dmitryrck/83a55938f767a17fee7633c3afb34802 to your computer and use it in GitHub Desktop.
Zero to Up and Running a Project with Rails - docker-compose.yml with PostgreSQL
version: "2"
services:
web:
build: .
volumes:
- .:/app
- bundle_path:/bundle
environment:
- BUNDLE_PATH=/bundle/vendor
- BUNDLE_APP_CONFIG=/app/.bundle
user: railsuser
command: bundle exec rails server -b 0.0.0.0
ports:
- "3000:3000"
links:
- db
db:
image: postgres
volumes:
- db:/var/lib/postgresql/data
expose:
- '5432'
volumes:
bundle_path:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment