Created
March 31, 2021 00:52
-
-
Save d-sea/cc23e64a4d3be4fe89eb3f82c92527f2 to your computer and use it in GitHub Desktop.
Ruby on Rails + Vue.js + MySQL docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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