Skip to content

Instantly share code, notes, and snippets.

@szromek
Last active October 26, 2017 09:41
Show Gist options
  • Save szromek/57ebb596601c1b87cb7f614b3c626210 to your computer and use it in GitHub Desktop.
Save szromek/57ebb596601c1b87cb7f614b3c626210 to your computer and use it in GitHub Desktop.
Sample docker-compose for Ruby on Rails application
version: '2'
services:
db:
image: postgres
volumes:
- postgres-volume:/var/lib/postgresql/data
web:
build: .
command: rails s -b 0.0.0.0 -p 3000
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
env_file:
- .env
environment:
- DB_USERNAME=postgres
- DB_PASSWORD=
- DB_HOST=db
- DB_NAME=application
volumes:
postgres-volume:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment