Skip to content

Instantly share code, notes, and snippets.

@d-sea
Created October 17, 2017 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d-sea/0ef0b73f5152d5433d94ee0611c8b326 to your computer and use it in GitHub Desktop.
Save d-sea/0ef0b73f5152d5433d94ee0611c8b326 to your computer and use it in GitHub Desktop.
Ruby on Rails 開発環境を Docker Compose で作った際の docker-compose.yml
version: '2'
services:
web:
depends_on:
- db
image: ruby:2.3.0
ports:
- "3000:3000"
links:
- db
working_dir: "/usr/src/app"
volumes:
- "./data/web/players1st:/usr/src/app"
stdin_open: true
tty: true
db:
image: mysql:5.6.38
volumes:
- "./data/db:/var/lib/mysql"
- "./db-config:/etc/mysql/conf.d"
environment:
MYSQL_ROOT_PASSWORD: [put_your_password]
MYSQL_DATABASE: [put_your_database_name]
MYSQL_USER: [put_your_user_name]
MYSQL_PASSWORD: [put_your_user_password]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment