質問編集履歴

3

タグ変更

2019/08/05 12:15

投稿

Ms.yy
Ms.yy

スコア83

test CHANGED
File without changes
test CHANGED
File without changes

2

homestead.yaml追加

2019/08/05 12:15

投稿

Ms.yy
Ms.yy

スコア83

test CHANGED
File without changes
test CHANGED
@@ -200,10 +200,312 @@
200
200
 
201
201
 
202
202
 
203
+ エラー部分であるhomestead.yaml3行目の見直し
204
+
205
+
206
+
207
+ ###app/Homestead/resoureces/Homestead.yaml
208
+
209
+ ```ここに言語を入力
210
+
211
+ ---
212
+
213
+ ip: "192.168.10.10"
214
+
215
+ memory: 2048
216
+
217
+ cpus: 2
218
+
219
+ provider: virtualbox
220
+
221
+
222
+
223
+ authorize: ~/.ssh/id_rsa.pub
224
+
225
+
226
+
227
+ keys:
228
+
229
+ - ~/.ssh/id_rsa
230
+
231
+
232
+
233
+ folders:
234
+
235
+ - map: ~/code
236
+
237
+ to: /home/vagrant/code
238
+
239
+
240
+
241
+ sites:
242
+
243
+ - map: homestead.test
244
+
245
+ to: /home/vagrant/code/public
246
+
247
+
248
+
249
+ databases:
250
+
251
+ - homestead
252
+
253
+
254
+
255
+ features:
256
+
257
+ - mariadb: false
258
+
259
+ - ohmyzsh: false
260
+
261
+ - webdriver: false
262
+
263
+
264
+
265
+ # ports:
266
+
267
+ # - send: 50000
268
+
269
+ # to: 5000
270
+
271
+ # - send: 7777
272
+
273
+ # to: 777
274
+
275
+ # protocol: udp
276
+
277
+
278
+
279
+ ```
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+ ###app/Homestead/Homestead.yaml
288
+
289
+
290
+
291
+ ```ここに言語を入力
292
+
293
+
294
+
295
+ --
296
+
297
+ ip: "192.168.10.10"
298
+
299
+ memory: 2048
300
+
301
+ cpus: 1
302
+
303
+ provider: virtualbox
304
+
305
+
306
+
307
+ authorize: ~/.ssh/id_rsa.pub
308
+
309
+
310
+
311
+ keys:
312
+
313
+ - ~/.ssh/id_rsa
314
+
315
+
316
+
317
+ folders:
318
+
319
+ - map: ~/app
320
+
321
+ to: /home/vagrant/Code
322
+
323
+
324
+
325
+ sites:
326
+
327
+ - map: homestead.test
328
+
329
+ to: /home/vagrant/Code/Laravel/public
330
+
331
+
332
+
333
+ databases:
334
+
335
+ - homestead
336
+
337
+
338
+
339
+ # blackfire:
340
+
341
+ # - id: foo
342
+
343
+ # token: bar
344
+
345
+ # client-id: foo
346
+
347
+ # client-token: bar
348
+
349
+
350
+
351
+ # ports:
352
+
353
+ # - send: 50000
354
+
355
+ # to: 5000
356
+
357
+ # - send: 7777
358
+
359
+ # to: 777
360
+
361
+ # protocol: udp
362
+
363
+ ~
364
+
365
+ ~
366
+
367
+ ~
368
+
369
+ ~ memory: 2048
370
+
371
+ cpus: 2
372
+
373
+ provider: virtualbox
374
+
375
+
376
+
377
+ authorize: ~/.ssh/id_rsa.pub
378
+
379
+
380
+
381
+ keys:
382
+
383
+ - ~/.ssh/id_rsa
384
+
385
+
386
+
387
+ folders:
388
+
389
+ - map: ~/code
390
+
391
+ to: /home/vagrant/code
392
+
393
+
394
+
395
+ sites:
396
+
397
+ - map: homestead.test
398
+
399
+ to: /home/vagrant/code/public
400
+
401
+
402
+
403
+ databases:
404
+
405
+ - homestead
406
+
407
+
408
+
409
+ features:
410
+
411
+ - mariadb: false
412
+
413
+ - ohmyzsh: false
414
+
415
+ - webdriver: false
416
+
417
+
418
+
419
+ # ports:
420
+
421
+ # - send: 50000
422
+
423
+ # to: 5000
424
+
425
+ # - send: 7777
426
+
427
+ # to: 777
428
+
429
+ ip: "192.168.10.10"
430
+
431
+ memory: 2048
432
+
433
+ cpus: 1
434
+
435
+ provider: virtualbox
436
+
437
+
438
+
439
+ authorize: ~/.ssh/id_rsa.pub
440
+
441
+
442
+
443
+ keys:
444
+
445
+ - ~/.ssh/id_rsa
446
+
447
+
448
+
449
+ folders:
450
+
451
+ - map: ~/app
452
+
453
+ to: /home/vagrant/Code
454
+
455
+
456
+
457
+ sites:
458
+
459
+ - map: homestead.test
460
+
461
+ to: /home/vagrant/Code/Laravel/public
462
+
463
+
464
+
465
+ databases:
466
+
467
+ - homestead
468
+
469
+
470
+
471
+ # blackfire:
472
+
473
+ # - id: foo
474
+
475
+ # token: bar
476
+
477
+ # client-id: foo
478
+
479
+ # client-token: bar
480
+
481
+
482
+
483
+ # ports:
484
+
485
+ # - send: 50000
486
+
487
+ # to: 5000
488
+
489
+ # - send: 7777
490
+
491
+ # to: 777
492
+
493
+ # protocol: udp# protocol: udp
494
+
495
+
496
+
497
+ ```
498
+
499
+
500
+
501
+
502
+
203
503
  ### 補足情報(FW/ツールのバージョンなど)
204
504
 
205
505
 
206
506
 
507
+
508
+
207
509
  mac os
208
510
 
209
511
 

1

内容追記 vagrantfile

2019/08/05 12:02

投稿

Ms.yy
Ms.yy

スコア83

test CHANGED
File without changes
test CHANGED
@@ -68,6 +68,130 @@
68
68
 
69
69
 
70
70
 
71
+ ###vagrantfile
72
+
73
+ ```ここに言語を入力
74
+
75
+ # -*- mode: ruby -*-
76
+
77
+ # vi: set ft=ruby :
78
+
79
+
80
+
81
+ require 'json'
82
+
83
+ require 'yaml'
84
+
85
+
86
+
87
+ VAGRANTFILE_API_VERSION ||= "2"
88
+
89
+ confDir = $confDir ||= File.expand_path(File.dirname(__FILE__))
90
+
91
+
92
+
93
+ homesteadYamlPath = confDir + "/Homestead.yaml"
94
+
95
+ homesteadJsonPath = confDir + "/Homestead.json"
96
+
97
+ afterScriptPath = confDir + "/after.sh"
98
+
99
+ customizationScriptPath = confDir + "/user-customizations.sh"
100
+
101
+ aliasesPath = confDir + "/aliases"
102
+
103
+
104
+
105
+ require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')
106
+
107
+
108
+
109
+ Vagrant.require_version '>= 2.2.4'
110
+
111
+
112
+
113
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
114
+
115
+ if File.exist? aliasesPath then
116
+
117
+ config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
118
+
119
+ config.vm.provision "shell" do |s|
120
+
121
+ s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases && chown vagrant:vagrant /home/vagrant/.bash_aliases"
122
+
123
+ end
124
+
125
+ end
126
+
127
+
128
+
129
+ if File.exist? homesteadYamlPath then
130
+
131
+ settings = YAML::load(File.read(homesteadYamlPath))
132
+
133
+ elsif File.exist? homesteadJsonPath then
134
+
135
+ settings = JSON::parse(File.read(homesteadJsonPath))
136
+
137
+ else
138
+
139
+ abort "Homestead settings file not found in #{confDir}"
140
+
141
+ end
142
+
143
+
144
+
145
+ Homestead.configure(config, settings)
146
+
147
+
148
+
149
+ if File.exist? afterScriptPath then
150
+
151
+ config.vm.provision "shell", path: afterScriptPath, privileged: false, keep_color: true
152
+
153
+ end
154
+
155
+
156
+
157
+ if File.exist? customizationScriptPath then
158
+
159
+ config.vm.provision "shell", path: customizationScriptPath, privileged: false, keep_color: true
160
+
161
+ end
162
+
163
+
164
+
165
+ if Vagrant.has_plugin?('vagrant-hostsupdater')
166
+
167
+ config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
168
+
169
+ elsif Vagrant.has_plugin?('vagrant-hostmanager')
170
+
171
+ config.hostmanager.enabled = true
172
+
173
+ config.hostmanager.manage_host = true
174
+
175
+ config.hostmanager.aliases = settings['sites'].map { |site| site['map'] }
176
+
177
+ end
178
+
179
+
180
+
181
+ if Vagrant.has_plugin?('vagrant-notify-forwarder')
182
+
183
+ config.notify_forwarder.enable = true
184
+
185
+ end
186
+
187
+ end
188
+
189
+
190
+
191
+ ```
192
+
193
+
194
+
71
195
 
72
196
 
73
197
  ### 試したこと