Skip to content

Commit dfe2dec

Browse files
committed
server/README.md: Document non-Docker setup
Previously, we only documented how to run the server via Docker. This adds a short tutorial how to run the server directly from `./server/app/interfaces/repository.py` without the Docker setup. Fixes #386
1 parent 064c7e4 commit dfe2dec

1 file changed

Lines changed: 6 additions & 26 deletions

File tree

server/README.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,45 +90,25 @@ To get a different setup this compose.yaml file can be adapted and expanded.
9090

9191
Note that the `Dockerfile` has to be specified explicitly, as the build context must be set to the parent directory of `/server` to allow access to the local `/sdk`.
9292

93-
## Running without Docker (Expert Development Only)
93+
## Running without Docker (Debugging Only)
9494

95-
The server can also be run directly on the host system without Docker, NGINX and supervisord. Although this is slower than the initial setup and not suitable for production, it may be useful for expert development.
95+
The server can also be run directly on the host system without Docker, NGINX and supervisord. Although this is not suitable for production, it may be useful for debugging.
9696

9797
> [!warning]
9898
> Not supported for production systems!
9999

100-
The setup must be run on Linux or via WSL, as uWSGI is not properly supported on Windows.
101-
102-
1. Install the required system packages.
103-
```bash
104-
$ sudo apt update && sudo apt upgrade -y
105-
$ sudo apt install python3 python3-pip python3-venv
106-
```
107-
108-
2. Create and activate a Python virtual environment.
109-
```bash
110-
$ python3 -m venv .venv
111-
$ source .venv/bin/activate
112-
```
113-
114-
3. Install uWSGI, the local SDK and the local server package.
100+
1. Install the local SDK and the local server package.
115101
```bash
116-
$ pip install uwsgi
117-
$ export SETUPTOOLS_SCM_PRETEND_VERSION=1.0.0
118102
$ pip install ../sdk
119103
$ pip install ./app
120104
```
121-
122-
Note that `export` only applies to the current shell session.
123105

124-
4. Create the storage folder and start the server.
106+
2. Run the server by executing the main function in [`./app/interfaces/repository.py`](./app/interfaces/repository.py) from within the current folder.
125107
```bash
126-
$ mkdir -p ./storage
127-
$ export STORAGE_PATH=./storage
128-
$ uwsgi --http :8080 --wsgi-file app/main.py
108+
$ python -m app.interfaces.repository
129109
```
130110

131-
As usual, files are read from `/storage` and the server can be accessed at http://localhost:8080/api/v3.0/ from your host system.
111+
The server can be accessed at http://localhost:8080/api/v3.0/ from your host system.
132112

133113
## Acknowledgments
134114

0 commit comments

Comments
 (0)