質問編集履歴
3
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -61,4 +61,93 @@
|
|
61
61
|
|
62
62
|
volumes:
|
63
63
|
gem_data:
|
64
|
+
```
|
65
|
+
|
66
|
+
database.yml
|
67
|
+
```
|
68
|
+
default: &default
|
69
|
+
adapter: mysql2
|
70
|
+
encoding: utf8
|
71
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
72
|
+
username: root
|
73
|
+
password: password
|
74
|
+
host: db
|
75
|
+
|
76
|
+
development:
|
77
|
+
<<: *default
|
78
|
+
database: myapp_development
|
79
|
+
|
80
|
+
# Warning: The database defined as "test" will be erased and
|
81
|
+
# re-generated from your development database when you run "rake".
|
82
|
+
# Do not set this db to the same as development or production.
|
83
|
+
test:
|
84
|
+
<<: *default
|
85
|
+
database: myapp_test
|
86
|
+
```
|
87
|
+
|
88
|
+
gemfile
|
89
|
+
```
|
90
|
+
source 'https://rubygems.org'
|
91
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
92
|
+
|
93
|
+
ruby '2.5.8'
|
94
|
+
|
95
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
96
|
+
gem 'rails', '~> 5.2.4', '>= 5.2.4.3'
|
97
|
+
# Use mysql as the database for Active Record
|
98
|
+
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
|
99
|
+
# Use Puma as the app server
|
100
|
+
gem 'puma', '~> 3.11'
|
101
|
+
# Use SCSS for stylesheets
|
102
|
+
gem 'sass-rails', '~> 5.0'
|
103
|
+
# Use Uglifier as compressor for JavaScript assets
|
104
|
+
gem 'uglifier', '>= 1.3.0'
|
105
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
106
|
+
# gem 'mini_racer', platforms: :ruby
|
107
|
+
|
108
|
+
# Use CoffeeScript for .coffee assets and views
|
109
|
+
gem 'coffee-rails', '~> 4.2'
|
110
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
111
|
+
gem 'turbolinks', '~> 5'
|
112
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
113
|
+
gem 'jbuilder', '~> 2.5'
|
114
|
+
# Use Redis adapter to run Action Cable in production
|
115
|
+
# gem 'redis', '~> 4.0'
|
116
|
+
# Use ActiveModel has_secure_password
|
117
|
+
# gem 'bcrypt', '~> 3.1.7'
|
118
|
+
|
119
|
+
# Use ActiveStorage variant
|
120
|
+
# gem 'mini_magick', '~> 4.8'
|
121
|
+
|
122
|
+
# Use Capistrano for deployment
|
123
|
+
# gem 'capistrano-rails', group: :development
|
124
|
+
|
125
|
+
# Reduces boot times through caching; required in config/boot.rb
|
126
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
127
|
+
|
128
|
+
group :development, :test do
|
129
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
130
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
131
|
+
end
|
132
|
+
|
133
|
+
group :development do
|
134
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
135
|
+
gem 'web-console', '>= 3.3.0'
|
136
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
137
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
138
|
+
gem 'spring'
|
139
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
140
|
+
end
|
141
|
+
|
142
|
+
group :test do
|
143
|
+
# Adds support for Capybara system testing and selenium driver
|
144
|
+
gem 'capybara', '>= 2.15'
|
145
|
+
gem 'selenium-webdriver'
|
146
|
+
# Easy installation and use of chromedriver to run system tests with Chrome
|
147
|
+
gem 'chromedriver-helper'
|
148
|
+
end
|
149
|
+
|
150
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
151
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
152
|
+
|
64
153
|
```
|
2
syuusei
title
CHANGED
File without changes
|
body
CHANGED
@@ -16,7 +16,49 @@
|
|
16
16
|
ruby 2.5.8
|
17
17
|
rails 5.2.4
|
18
18
|
|
19
|
-
|
19
|
+
Dockerfile
|
20
20
|
```
|
21
|
+
FROM ruby:2.5
|
22
|
+
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
|
23
|
+
|
24
|
+
RUN mkdir /myapp
|
25
|
+
WORKDIR /myapp
|
26
|
+
|
27
|
+
COPY Gemfile /myapp/Gemfile
|
28
|
+
COPY Gemfile.lock /myapp/Gemfile.lock
|
29
|
+
|
30
|
+
RUN bundle install
|
31
|
+
COPY . /myapp
|
32
|
+
```
|
33
|
+
|
34
|
+
docker-compose.yml
|
35
|
+
```
|
36
|
+
version: '3'
|
37
|
+
|
38
|
+
services:
|
39
|
+
db:
|
40
|
+
image: mysql:5.6
|
41
|
+
environment:
|
42
|
+
MYSQL_USER: root
|
43
|
+
MYSQL_ROOT_PASSWORD: password
|
44
|
+
ports:
|
45
|
+
- "3306:3306"
|
46
|
+
volumes:
|
21
|
-
|
47
|
+
- ./db/mysql/volumes:/var/lib/mysql
|
48
|
+
|
49
|
+
web:
|
50
|
+
build: .
|
51
|
+
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
52
|
+
volumes:
|
53
|
+
- .:/myapp
|
54
|
+
- gem_data:/usr/local/bundle
|
55
|
+
ports:
|
56
|
+
- 3000:3000
|
57
|
+
depends_on:
|
58
|
+
- db
|
59
|
+
tty: true
|
60
|
+
stdin_open: true
|
61
|
+
|
62
|
+
volumes:
|
63
|
+
gem_data:
|
22
64
|
```
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,4 +14,9 @@
|
|
14
14
|
|
15
15
|
mysql 5.6.47
|
16
16
|
ruby 2.5.8
|
17
|
-
rails 5.2.4
|
17
|
+
rails 5.2.4
|
18
|
+
|
19
|
+
Gemfile
|
20
|
+
```
|
21
|
+
https://gyazo.com/6e16940eba855a989b72efd95bbe8685
|
22
|
+
```
|