Help us understand the problem. What is going on with this article?

Rails5 + webpacker環境をVagrantで構築するときの設定ファイル

More than 3 years have passed since last update.

Vagrantで構築する環境

  • OS: Ubuntu16.04
  • DB: mysql5.7

設定ファイル

Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/boxes/xenial64"
  config.vm.box = "ubuntu/xenial64"

  config.vm.network "forwarded_port", guest: 3000, host: 3000 // rails用
  config.vm.network "forwarded_port", guest: 8080, host: 8080 // webpack server
  config.vm.network "private_network", ip: "192.168.33.10"

  # dockerでmysqlを構築
  config.vm.provision "docker" do |d|
    d.run "db",
          image: "library/mysql:5.7.18",
          args: "-p 3306:3306 -v /var/host_lib/mysql:/var/lib/mysql --name mysqld -e MYSQL_ROOT_PASSWORD=password -d"
  end
end
config/webpack/development.server.js
module.exports = merge(devConfig, {
  devServer: {
    host: "0.0.0.0",
k-yamada-github
Kotlin, Swift, Android, iOS, Vue.js, AWS
sonix
Mobility Tech Company「世界」をリードするイノベータ集団でありたい
https://www.sonix.asia/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away