質問編集履歴
3
説明を追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,4 +23,9 @@
|
|
23
23
|
|
24
24
|
[Install]
|
25
25
|
WantedBy=multi-user.target
|
26
|
+
```
|
27
|
+
上記のようにファイルを変更したところ、エラーが次のようになりました。
|
28
|
+
```
|
29
|
+
Main process exited, code=exited, status=1/FAILURE
|
30
|
+
Failed with result 'exit-code'.
|
26
31
|
```
|
2
コードに修正を加えました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,12 +18,9 @@
|
|
18
18
|
After=network.target
|
19
19
|
|
20
20
|
[Service]
|
21
|
-
User=ubuntu
|
22
|
-
Group=ubuntu
|
23
21
|
WorkingDirectory=/path/to/django/app
|
24
|
-
ExecStart=/
|
22
|
+
ExecStart=/usr/local/bin/gunicorn -w 3 -b 127.0.0.1:8000 {djangoappname}.wsgi
|
25
23
|
|
26
24
|
[Install]
|
27
25
|
WantedBy=multi-user.target
|
28
|
-
/path/to/gunicornは、which gunic
|
29
26
|
```
|
1
説明を追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,4 +8,22 @@
|
|
8
8
|
```
|
9
9
|
Apacheを使えば良い等あるかと思いますが、上記のような要件でrunserverすることはできるのでしょうか?
|
10
10
|
|
11
|
-
ご教示いただけますと幸いです。よろしくお願いいたします。
|
11
|
+
ご教示いただけますと幸いです。よろしくお願いいたします。
|
12
|
+
|
13
|
+
## 追記
|
14
|
+
実際に設定したファイルは以下になります。
|
15
|
+
```
|
16
|
+
[Unit]
|
17
|
+
Description=gunicorn daemon
|
18
|
+
After=network.target
|
19
|
+
|
20
|
+
[Service]
|
21
|
+
User=ubuntu
|
22
|
+
Group=ubuntu
|
23
|
+
WorkingDirectory=/path/to/django/app
|
24
|
+
ExecStart=/path/to/gunicorn -w 3 -b 127.0.0.1:8000 {djangoappname}.wsgi
|
25
|
+
|
26
|
+
[Install]
|
27
|
+
WantedBy=multi-user.target
|
28
|
+
/path/to/gunicornは、which gunic
|
29
|
+
```
|