Skip to content

Instantly share code, notes, and snippets.

@davidmaogomezz
Last active March 15, 2020 15:38
Show Gist options
  • Save davidmaogomezz/fef101c2d0c79923b337e8a02403d4ae to your computer and use it in GitHub Desktop.
Save davidmaogomezz/fef101c2d0c79923b337e8a02403d4ae to your computer and use it in GitHub Desktop.
Docker-compose.yml for connect database rails postgres docker
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./tmp/db:/var/lib/postgresql/data
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"
depends_on:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment