Skip to content

Instantly share code, notes, and snippets.

@d-sea
Created March 31, 2021 00:52
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/cc23e64a4d3be4fe89eb3f82c92527f2 to your computer and use it in GitHub Desktop.
Save d-sea/cc23e64a4d3be4fe89eb3f82c92527f2 to your computer and use it in GitHub Desktop.
Ruby on Rails + Vue.js + MySQL docker-compose.yml
version: '3'
services:
web:
# image: ruby:2.6.6
build:
context: .
dockerfile: Dockerfile-web
depends_on:
- db
ports:
- "3000:3000"
links:
- db
working_dir: "/usr/src/app"
volumes:
- "./data/web/players1st:/usr/src/app"
stdin_open: true
tty: true
environment:
TZ: Japan
command: bash -c "bundle install && bundle exec rails s -p 3000 -b 0.0.0.0 -e development"
db:
image: mysql:5.6.38
ports:
- "3306:3306"
volumes:
- "./data/db:/var/lib/mysql"
- "./db-config:/etc/mysql/conf.d"
environment:
TZ: Japan
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: players1st_development_utf8mb4
MYSQL_USER: root
MYSQL_PASSWORD: root
webpack:
image: node:15.2.0
ports:
- "8080:8080"
links:
- web
working_dir: "/usr/src/app"
volumes:
- "./data/web/players1st:/usr/src/app"
command: bash -c "yarn --network-timeout 10000 && yarn run start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment