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
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
## Building and running the image with docker-compose
68
+
## Building and Running the Image with Docker Compose
65
69
66
70
The container image can also be built and run via:
67
71
```
68
72
$ docker compose up
69
73
```
70
74
71
-
This is the exemplary `docker-compose` file for the server:
72
-
````yaml
75
+
This is the exemplary `compose.yml` file for the server:
76
+
```yaml
73
77
services:
74
78
app:
75
79
build:
@@ -79,13 +83,33 @@ services:
79
83
- "8080:80"
80
84
volumes:
81
85
- ./storage:/storage
82
-
````
86
+
```
83
87
84
88
Here files are read from `/storage` and the server can be accessed at http://localhost:8080/api/v3.0/ from your host system.
85
89
To get a different setup this compose.yaml file can be adapted and expanded.
86
90
87
91
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`.
88
92
93
+
## Running without Docker (Debugging Only)
94
+
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.
96
+
97
+
> [!warning]
98
+
> Not supported for production systems!
99
+
100
+
1. Install the local SDK and the local server package.
101
+
```bash
102
+
$ pip install ../sdk
103
+
$ pip install ./app
104
+
```
105
+
106
+
2. Run the server by executing the main function in [`./app/interfaces/repository.py`](./app/interfaces/repository.py) from within the current folder.
107
+
```bash
108
+
$ python -m app.interfaces.repository
109
+
```
110
+
111
+
The server can be accessed at http://localhost:8080/api/v3.0/ from your host system.
112
+
89
113
## Acknowledgments
90
114
91
115
This Dockerfile is inspired by the [tiangolo/uwsgi-nginx-docker][10] repository.
0 commit comments