Skip to content

Instantly share code, notes, and snippets.

@tatethurston
Last active November 19, 2017 10:09
Show Gist options
  • Save tatethurston/74135a1b9cbdbce3795a908a21f50fbb to your computer and use it in GitHub Desktop.
Save tatethurston/74135a1b9cbdbce3795a908a21f50fbb to your computer and use it in GitHub Desktop.
rails docker compose
version: '3'
services:
db:
image: postgres
# ports:
# - "5432:5432"
web:
image: ruby:2.3-onbuild
command: bundle exec rails s -p 5000 -b '0.0.0.0'
volumes:
# share files
- .:/usr/src/app
# cache gem bundle
- ruby_gems:/usr/local/bundle
ports:
- "5000:5000"
depends_on:
- db
environment:
- DATABASE_URL=postgres://postgres@db:5432/markov-tweet
- TEST_DATABASE_URL=postgres://postgres@db:5432/markov-tweet-test
volumes:
ruby_gems: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment