Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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