質問編集履歴
9
修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -90,22 +90,20 @@
|
|
90
90
|
```ここに言語を入力
|
91
91
|
upstream app_server {
|
92
92
|
# sharedの中を参照するよう変更
|
93
|
-
server unix:/var/www/
|
93
|
+
server unix:/var/www/アプリ名/shared/tmp/sockets/unicorn.sock;
|
94
94
|
}
|
95
95
|
|
96
96
|
server {
|
97
97
|
listen 80;
|
98
|
-
server_name
|
98
|
+
server_name xx.xx.xx.xx ;
|
99
99
|
|
100
|
-
# currentの中を参照するよう変更
|
101
|
-
root /var/www/
|
100
|
+
root /var/www/アプリ名/current/public;
|
102
101
|
|
103
102
|
location ^~ /assets/ {
|
104
103
|
gzip_static on;
|
105
104
|
expires max;
|
106
105
|
add_header Cache-Control public;
|
107
|
-
# currentの中を参照するよう変更
|
108
|
-
root /var/www/
|
106
|
+
root /var/www/アプリ名/current/public;
|
109
107
|
}
|
110
108
|
|
111
109
|
try_files $uri/index.html $uri @unicorn;
|
@@ -123,18 +121,18 @@
|
|
123
121
|
|
124
122
|
/container/nginx/nginx.conf
|
125
123
|
```ここに言語を入力
|
126
|
-
upstream
|
124
|
+
upstream アプリ名 {
|
127
|
-
server unix:///
|
125
|
+
server unix:///アプリ名/tmp/sockets/puma.sock;
|
128
126
|
}
|
129
127
|
|
130
128
|
server {
|
131
129
|
listen 80;
|
132
|
-
server_name
|
130
|
+
server_name アプリ名.com;
|
133
131
|
|
134
132
|
access_log /var/log/nginx/access.log;
|
135
133
|
error_log /var/log/nginx/error.log;
|
136
134
|
|
137
|
-
root /
|
135
|
+
root /アプリ名/public;
|
138
136
|
|
139
137
|
client_max_body_size 100m;
|
140
138
|
error_page 404 /404.html;
|
@@ -142,11 +140,11 @@
|
|
142
140
|
try_files $uri/index.html $uri @CustomerCalender;
|
143
141
|
keepalive_timeout 5;
|
144
142
|
|
145
|
-
location @
|
143
|
+
location @アプリ名 {
|
146
144
|
proxy_set_header X-Real-IP $remote_addr;
|
147
145
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
148
146
|
proxy_set_header Host $http_host;
|
149
|
-
proxy_pass http://
|
147
|
+
proxy_pass http://アプリ名;
|
150
148
|
}
|
151
149
|
}
|
152
150
|
```
|
8
修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -148,4 +148,5 @@
|
|
148
148
|
proxy_set_header Host $http_host;
|
149
149
|
proxy_pass http://CustomerCalender;
|
150
150
|
}
|
151
|
-
}
|
151
|
+
}
|
152
|
+
```
|
7
試した事追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,6 +33,9 @@
|
|
33
33
|
|
34
34
|
|
35
35
|
### 試したこと
|
36
|
+
|
37
|
+
・sudo yum update
|
38
|
+
|
36
39
|
このサイトを参考に
|
37
40
|
[https://qiita.com/KONTA2019/items/2a519f18b204dea9a771](https://qiita.com/KONTA2019/items/2a519f18b204dea9a771)
|
38
41
|
・sudo vim rails.conf
|
6
修正しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -145,50 +145,4 @@
|
|
145
145
|
proxy_set_header Host $http_host;
|
146
146
|
proxy_pass http://CustomerCalender;
|
147
147
|
}
|
148
|
-
}
|
148
|
+
}
|
149
|
-
```
|
150
|
-
ls -la /var/www/CustomerCalender
|
151
|
-
```ここに言語を入力
|
152
|
-
合計 1140
|
153
|
-
drwxrwxr-x 21 ec2-user ec2-user 4096 1月 30 08:40 .
|
154
|
-
drwxr-xr-x 3 ec2-user root 30 1月 2 07:53 ..
|
155
|
-
-rw-rw-r-- 1 ec2-user ec2-user 9 1月 1 16:25 .browserslistrc
|
156
|
-
drwxrwxr-x 2 ec2-user ec2-user 24 1月 18 10:28 .circleci
|
157
|
-
drwxrwxr-x 8 ec2-user ec2-user 198 1月 23 09:56 .git
|
158
|
-
-rw-rw-r-- 1 ec2-user ec2-user 799 1月 23 09:56 .gitignore
|
159
|
-
-rw-rw-r-- 1 ec2-user ec2-user 44 1月 1 16:25 .rspec
|
160
|
-
-rw-rw-r-- 1 ec2-user ec2-user 6 1月 1 16:25 .ruby-version
|
161
|
-
-rw-rw-r-- 1 ec2-user ec2-user 342 1月 4 08:33 Capfile
|
162
|
-
-rw-rw-r-- 1 ec2-user ec2-user 690 1月 17 06:18 Dockerfile
|
163
|
-
-rw-rw-r-- 1 ec2-user ec2-user 2430 1月 17 06:18 Gemfile
|
164
|
-
-rw-rw-r-- 1 ec2-user ec2-user 8618 1月 17 06:18 Gemfile.lock
|
165
|
-
-rw-rw-r-- 1 ec2-user ec2-user 2919 1月 21 06:26 README.md
|
166
|
-
-rw-rw-r-- 1 ec2-user ec2-user 227 1月 1 16:25 Rakefile
|
167
|
-
drwxrwxr-x 11 ec2-user ec2-user 142 1月 1 16:25 app
|
168
|
-
-rw-rw-r-- 1 ec2-user ec2-user 1722 1月 1 16:25 babel.config.js
|
169
|
-
drwxrwxr-x 2 ec2-user ec2-user 125 1月 1 16:25 bin
|
170
|
-
drwxrwxr-x 7 ec2-user ec2-user 4096 1月 26 11:00 config
|
171
|
-
-rw-rw-r-- 1 ec2-user ec2-user 130 1月 1 16:25 config.ru
|
172
|
-
drwxrwxr-x 3 ec2-user ec2-user 19 1月 17 06:18 containers
|
173
|
-
lrwxrwxrwx 1 ec2-user ec2-user 49 1月 30 08:40 current -> /var/www/CustomerCalender/releases/20210130083913
|
174
|
-
drwxrwxr-x 3 ec2-user ec2-user 54 1月 23 09:56 db
|
175
|
-
-rw-rw-r-- 1 ec2-user ec2-user 894 1月 22 03:08 docker-compose.yml
|
176
|
-
drwxrwxr-x 4 ec2-user ec2-user 33 1月 1 16:25 lib
|
177
|
-
drwxrwxr-x 2 ec2-user ec2-user 116 1月 17 06:19 log
|
178
|
-
drwxrwxr-x 776 ec2-user ec2-user 24576 1月 30 10:39 node_modules
|
179
|
-
-rw-rw-r-- 1 ec2-user ec2-user 340235 1月 3 10:10 package-lock.json
|
180
|
-
-rw-rw-r-- 1 ec2-user ec2-user 708 1月 14 08:23 package.json
|
181
|
-
-rw-rw-r-- 1 ec2-user ec2-user 224 1月 1 16:25 postcss.config.js
|
182
|
-
drwxrwxr-x 4 ec2-user ec2-user 186 1月 3 05:54 public
|
183
|
-
drwxrwxr-x 7 ec2-user ec2-user 116 1月 30 08:40 releases
|
184
|
-
drwxrwxr-x 7 ec2-user ec2-user 156 1月 30 08:39 repo
|
185
|
-
-rw-rw-r-- 1 ec2-user ec2-user 6588 1月 30 08:40 revisions.log
|
186
|
-
drwxrwxr-x 8 ec2-user ec2-user 84 1月 17 01:24 shared
|
187
|
-
drwxrwxr-x 6 ec2-user ec2-user 116 1月 1 16:25 spec
|
188
|
-
drwxrwxr-x 2 ec2-user ec2-user 19 1月 1 16:25 storage
|
189
|
-
drwxrwxr-x 10 ec2-user ec2-user 195 1月 1 16:25 test
|
190
|
-
drwxrwxr-x 6 ec2-user ec2-user 105 1月 17 06:19 tmp
|
191
|
-
drwxrwxr-x 2 ec2-user ec2-user 19 1月 1 16:25 vendor
|
192
|
-
-rw-rw-r-- 1 ec2-user ec2-user 353007 1月 30 11:45 yarn-error.log
|
193
|
-
-rw-rw-r-- 1 ec2-user ec2-user 336157 1月 4 04:48 yarn.lock
|
194
|
-
```
|
5
情報追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -79,4 +79,116 @@
|
|
79
79
|
エラーの内容で調べたところ、権限の問題かと思い、権限追加のコマンドを入力してみましたが、
|
80
80
|
改善されなかった為、質問させて頂きました。
|
81
81
|
|
82
|
-
何卒、宜しくお願い致します。
|
82
|
+
何卒、宜しくお願い致します。
|
83
|
+
|
84
|
+
|
85
|
+
#追記
|
86
|
+
sudo vim /etc/nginx/conf.d/rails.conf
|
87
|
+
```ここに言語を入力
|
88
|
+
upstream app_server {
|
89
|
+
# sharedの中を参照するよう変更
|
90
|
+
server unix:/var/www/CustomerCalender/shared/tmp/sockets/unicorn.sock;
|
91
|
+
}
|
92
|
+
|
93
|
+
server {
|
94
|
+
listen 80;
|
95
|
+
server_name 54.92.32.88 ;
|
96
|
+
|
97
|
+
# currentの中を参照するよう変更
|
98
|
+
root /var/www/CustomerCalender/current/public;
|
99
|
+
|
100
|
+
location ^~ /assets/ {
|
101
|
+
gzip_static on;
|
102
|
+
expires max;
|
103
|
+
add_header Cache-Control public;
|
104
|
+
# currentの中を参照するよう変更
|
105
|
+
root /var/www/CustomerCalender/current/public;
|
106
|
+
}
|
107
|
+
|
108
|
+
try_files $uri/index.html $uri @unicorn;
|
109
|
+
|
110
|
+
location @unicorn {
|
111
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
112
|
+
proxy_set_header Host $http_host;
|
113
|
+
proxy_redirect off;
|
114
|
+
proxy_pass http://app_server;
|
115
|
+
}
|
116
|
+
|
117
|
+
error_page 500 502 503 504 /500.html;
|
118
|
+
}
|
119
|
+
```
|
120
|
+
|
121
|
+
/container/nginx/nginx.conf
|
122
|
+
```ここに言語を入力
|
123
|
+
upstream CustomerCalender {
|
124
|
+
server unix:///CustomerCalender/tmp/sockets/puma.sock;
|
125
|
+
}
|
126
|
+
|
127
|
+
server {
|
128
|
+
listen 80;
|
129
|
+
server_name customer-calender.com;
|
130
|
+
|
131
|
+
access_log /var/log/nginx/access.log;
|
132
|
+
error_log /var/log/nginx/error.log;
|
133
|
+
|
134
|
+
root /CustomerCalender/public;
|
135
|
+
|
136
|
+
client_max_body_size 100m;
|
137
|
+
error_page 404 /404.html;
|
138
|
+
error_page 505 502 503 504 /500.html;
|
139
|
+
try_files $uri/index.html $uri @CustomerCalender;
|
140
|
+
keepalive_timeout 5;
|
141
|
+
|
142
|
+
location @CustomerCalender {
|
143
|
+
proxy_set_header X-Real-IP $remote_addr;
|
144
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
145
|
+
proxy_set_header Host $http_host;
|
146
|
+
proxy_pass http://CustomerCalender;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
```
|
150
|
+
ls -la /var/www/CustomerCalender
|
151
|
+
```ここに言語を入力
|
152
|
+
合計 1140
|
153
|
+
drwxrwxr-x 21 ec2-user ec2-user 4096 1月 30 08:40 .
|
154
|
+
drwxr-xr-x 3 ec2-user root 30 1月 2 07:53 ..
|
155
|
+
-rw-rw-r-- 1 ec2-user ec2-user 9 1月 1 16:25 .browserslistrc
|
156
|
+
drwxrwxr-x 2 ec2-user ec2-user 24 1月 18 10:28 .circleci
|
157
|
+
drwxrwxr-x 8 ec2-user ec2-user 198 1月 23 09:56 .git
|
158
|
+
-rw-rw-r-- 1 ec2-user ec2-user 799 1月 23 09:56 .gitignore
|
159
|
+
-rw-rw-r-- 1 ec2-user ec2-user 44 1月 1 16:25 .rspec
|
160
|
+
-rw-rw-r-- 1 ec2-user ec2-user 6 1月 1 16:25 .ruby-version
|
161
|
+
-rw-rw-r-- 1 ec2-user ec2-user 342 1月 4 08:33 Capfile
|
162
|
+
-rw-rw-r-- 1 ec2-user ec2-user 690 1月 17 06:18 Dockerfile
|
163
|
+
-rw-rw-r-- 1 ec2-user ec2-user 2430 1月 17 06:18 Gemfile
|
164
|
+
-rw-rw-r-- 1 ec2-user ec2-user 8618 1月 17 06:18 Gemfile.lock
|
165
|
+
-rw-rw-r-- 1 ec2-user ec2-user 2919 1月 21 06:26 README.md
|
166
|
+
-rw-rw-r-- 1 ec2-user ec2-user 227 1月 1 16:25 Rakefile
|
167
|
+
drwxrwxr-x 11 ec2-user ec2-user 142 1月 1 16:25 app
|
168
|
+
-rw-rw-r-- 1 ec2-user ec2-user 1722 1月 1 16:25 babel.config.js
|
169
|
+
drwxrwxr-x 2 ec2-user ec2-user 125 1月 1 16:25 bin
|
170
|
+
drwxrwxr-x 7 ec2-user ec2-user 4096 1月 26 11:00 config
|
171
|
+
-rw-rw-r-- 1 ec2-user ec2-user 130 1月 1 16:25 config.ru
|
172
|
+
drwxrwxr-x 3 ec2-user ec2-user 19 1月 17 06:18 containers
|
173
|
+
lrwxrwxrwx 1 ec2-user ec2-user 49 1月 30 08:40 current -> /var/www/CustomerCalender/releases/20210130083913
|
174
|
+
drwxrwxr-x 3 ec2-user ec2-user 54 1月 23 09:56 db
|
175
|
+
-rw-rw-r-- 1 ec2-user ec2-user 894 1月 22 03:08 docker-compose.yml
|
176
|
+
drwxrwxr-x 4 ec2-user ec2-user 33 1月 1 16:25 lib
|
177
|
+
drwxrwxr-x 2 ec2-user ec2-user 116 1月 17 06:19 log
|
178
|
+
drwxrwxr-x 776 ec2-user ec2-user 24576 1月 30 10:39 node_modules
|
179
|
+
-rw-rw-r-- 1 ec2-user ec2-user 340235 1月 3 10:10 package-lock.json
|
180
|
+
-rw-rw-r-- 1 ec2-user ec2-user 708 1月 14 08:23 package.json
|
181
|
+
-rw-rw-r-- 1 ec2-user ec2-user 224 1月 1 16:25 postcss.config.js
|
182
|
+
drwxrwxr-x 4 ec2-user ec2-user 186 1月 3 05:54 public
|
183
|
+
drwxrwxr-x 7 ec2-user ec2-user 116 1月 30 08:40 releases
|
184
|
+
drwxrwxr-x 7 ec2-user ec2-user 156 1月 30 08:39 repo
|
185
|
+
-rw-rw-r-- 1 ec2-user ec2-user 6588 1月 30 08:40 revisions.log
|
186
|
+
drwxrwxr-x 8 ec2-user ec2-user 84 1月 17 01:24 shared
|
187
|
+
drwxrwxr-x 6 ec2-user ec2-user 116 1月 1 16:25 spec
|
188
|
+
drwxrwxr-x 2 ec2-user ec2-user 19 1月 1 16:25 storage
|
189
|
+
drwxrwxr-x 10 ec2-user ec2-user 195 1月 1 16:25 test
|
190
|
+
drwxrwxr-x 6 ec2-user ec2-user 105 1月 17 06:19 tmp
|
191
|
+
drwxrwxr-x 2 ec2-user ec2-user 19 1月 1 16:25 vendor
|
192
|
+
-rw-rw-r-- 1 ec2-user ec2-user 353007 1月 30 11:45 yarn-error.log
|
193
|
+
-rw-rw-r-- 1 ec2-user ec2-user 336157 1月 4 04:48 yarn.lock
|
194
|
+
```
|
4
試した事追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -52,11 +52,16 @@
|
|
52
52
|
|
53
53
|
・sudo chown -R $USER /var/www/アプリ名/node_modules/.bin/acorn
|
54
54
|
・sudo chown -R ec2-user:ec2-user /var/www/アプリ名/node_modules/.bin/acorn
|
55
|
+
↑
|
56
|
+
権限変わってなさそうです。
|
55
57
|
|
56
58
|
・ls -la /var/www/アプリ名/node_modules/.bin/acorn
|
57
59
|
→結果
|
58
60
|
lrwxrwxrwx 1 ec2-user ec2-user 18 1月 23 10:04 /var/www/アプリ名/node_modules/.bin/acorn -> ../acorn/bin/acorn
|
59
61
|
|
62
|
+
・yarn install
|
63
|
+
→同じエラーになります。
|
64
|
+
|
60
65
|
参考サイト
|
61
66
|
[https://teratail.com/questions/172559](https://teratail.com/questions/172559)
|
62
67
|
[https://qiita.com/KONTA2019/items/2a519f18b204dea9a771](https://qiita.com/KONTA2019/items/2a519f18b204dea9a771)
|
3
文言修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -30,10 +30,7 @@
|
|
30
30
|
```ここに言語を入力
|
31
31
|
lrwxrwxrwx 1 ec2-user ec2-user 18 1月 23 10:04 /var/www/アプリ名/node_modules/.bin/acorn -> ../acorn/bin/acorn
|
32
32
|
```
|
33
|
-
### 該当のソースコード
|
34
33
|
|
35
|
-
```ここに言語名を入力
|
36
|
-
```
|
37
34
|
|
38
35
|
### 試したこと
|
39
36
|
このサイトを参考に
|
2
文言修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
healthy→unhealthyとなり、
|
12
12
|
Health checks failed with these codes: [500]となりました。
|
13
13
|
|
14
|
+
assets:precompileと、Health checksのエラーを解消したいです。
|
14
15
|
|
15
16
|
### 発生している問題・エラーメッセージ
|
16
17
|
|
1
リンク修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
### 試したこと
|
38
38
|
このサイトを参考に
|
39
|
-
[
|
39
|
+
[https://qiita.com/KONTA2019/items/2a519f18b204dea9a771](https://qiita.com/KONTA2019/items/2a519f18b204dea9a771)
|
40
40
|
・sudo vim rails.conf
|
41
41
|
↓
|
42
42
|
/var/www/アプリ名/current/public/
|
@@ -60,10 +60,10 @@
|
|
60
60
|
lrwxrwxrwx 1 ec2-user ec2-user 18 1月 23 10:04 /var/www/アプリ名/node_modules/.bin/acorn -> ../acorn/bin/acorn
|
61
61
|
|
62
62
|
参考サイト
|
63
|
-
[リンク内容](https://teratail.com/questions/172559)
|
64
|
-
[リンク内容](https://qiita.com/KONTA2019/items/2a519f18b204dea9a771)
|
65
|
-
[
|
63
|
+
[https://teratail.com/questions/172559](https://teratail.com/questions/172559)
|
64
|
+
[https://qiita.com/KONTA2019/items/2a519f18b204dea9a771](https://qiita.com/KONTA2019/items/2a519f18b204dea9a771)
|
65
|
+
[https://stackoverflow.com/questions/45166318/eacces-permission-denied-unlink](https://stackoverflow.com/questions/45166318/eacces-permission-denied-unlink)
|
66
|
-
[
|
66
|
+
[https://github.com/yarnpkg/yarn/issues/872](https://github.com/yarnpkg/yarn/issues/872)
|
67
67
|
|
68
68
|
### 補足情報(FW/ツールのバージョンなど)
|
69
69
|
rails6
|