You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/src/configuring/web-ui.md
+114-22
Original file line number
Diff line number
Diff line change
@@ -2,47 +2,125 @@
2
2
3
3
Cuckoo3 frontend is built with [Django](https://www.djangoproject.com/){:target=_blank}.
4
4
Default settings can be overwritten in `~/.cuckoocwd/web/web_local_settings.py`.
5
-
You can use the frontend in two ways - commandline or [Nginx](https://nginx.org/en/){:target=_blank} and [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/){:target=_blank}.
5
+
You can use the frontend in two ways - commandline or [Nginx](https://nginx.org/en/){:target=_blank} and [WSGI](https://uwsgi-docs.readthedocs.io/en/latest/){:target=_blank} / [ASGI](https://asgi.readthedocs.io/en/latest/){:target=_blank}.
6
6
7
-
## Commandline
7
+
!!! note "Recommendation"
8
+
We recommend ASGI from Cuckoo version 0.10.0 and on
8
9
9
-
!!! warning "Unverified"
10
+
## Generating static content
11
+
Before serving Cuckoo web server, you have to generate the static content.
10
12
11
-
This is from the old documentation and needs verification.
12
-
It may contain errors, bugs or outdated information.
13
+
**Steps**
13
14
14
-
This is a development server.
15
-
You can start Cuckoo frontend from the commandline with the following command:
15
+
1. Set `STATIC_ROOT` variable in `~/.cuckoocwd/web/web_local_settings.py`. Cuckoo user must have access to that path.
16
16
17
-
```bash
18
-
cuckoo web --host <listen ip> --port <listen port>
19
-
```
17
+
2. Build documentation for Cuckoo. You need to be in `cuckoo3` directory and have Python virtual environment active.
20
18
21
-
## Serving the web UI with Nginx And uWSGI
19
+
cd docs
20
+
python3.10 -m pip install -r requirements.txt
21
+
mkdocs build
22
+
cp -R site ../web/cuckoo/web/static/docs
23
+
24
+
3. Run Django `collectstatic` command.
25
+
26
+
cuckoo web djangocommand collectstatic
27
+
28
+
## Serving the web UI with Daphne(ASGI) and Nginx
22
29
23
30
!!! note "Requirements"
24
31
25
32
Please make sure that you have:
26
33
27
-
- installed all dependencies for [serving API and web](../installing/dependencies.md#serving-api-and-web){:target=_blank}
34
+
- installed all dependencies for [serving API and web - ASGI](../installing/dependencies.md#asgi){:target=_blank}
28
35
29
-
If you want to serve Cuckoo in an environment such as development, testing, staging or production, you need to use uWSGI and Nginx.
30
-
uWSGI is used as an application server and Nginx as a webserver.
36
+
Daphne is used as an ASGI application server and Nginx as a webserver.
31
37
32
38
**Steps**
33
39
34
-
1. Set `STATIC_ROOT` variable in `~/.cuckoocwd/web/web_local_settings.py`. Cuckoo user must have access to that path.
0 commit comments