Skip to content

Instantly share code, notes, and snippets.

@braidn
Created October 24, 2016 15:51
Show Gist options
  • Save braidn/bda5d15c03391afb9049107afc1cc617 to your computer and use it in GitHub Desktop.
Save braidn/bda5d15c03391afb9049107afc1cc617 to your computer and use it in GitHub Desktop.
version: '2'
services:
db:
image: kiasaki/alpine-postgres
volumes:
- ./pgdata:/pgdata
ports:
- "5432:5432"
environment:
POSTGRES_DB: greenhouse_development
POSTGRES_USER: postgres
PGDATA: /pgdata
redis:
image: redis
web:
build: .
command: bundle exec rails server -p 3000 -b '0.0.0.0'
links:
- db
- redis
volumes_from:
- bundle_cache
- npm_cache
volumes:
- .bundle:/src/gems/
- .node_modules:/src/node_modules
- .:/home/greenhouse/repo
- ./keys:/root/.ssh/
- ./package.json:/src/package.json
ports:
- '3000:3000'
env_file:
- .env
environment:
REDIS_URL: redis://redis:6379
npm_cache:
image: busybox
volumes:
- /src/node_modules
bundle_cache:
image: busybox
volumes:
- /src/gems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment