Skip to content

Commit f61e798

Browse files
committed
Add some explanations for the different containers
1 parent b1d02ab commit f61e798

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/development/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,30 @@
22
title: "Development"
33
sidebar_position: 4
44
---
5+
6+
## Architecture
7+
8+
Currently the setup is split up into for different containers. In this document the general architecture and reason for the components will be explained
9+
10+
### Backend
11+
12+
The Backend uses Django as a Framework. Everything the generally applies to Django can be applied to LibrePhotos. If there is some feature that is in Django, but not yet in LibrePhotos, then this would be quite easy to add.
13+
14+
In general there are four process running in the backend.
15+
16+
- As a Webserver and for the handling of general API calls we use Gunicorn. Scaling works here with the worker argument Gunicorn provides-
17+
- For long running jobs we use django_q2 with ORM settings. Scaling works here with the HEAVYWORKER env variable.
18+
- A image similarity service is also hosted, which uses faiss. If you want to get similar images or if you want to search semantically, this is needed.
19+
- A thumbnail service, which generates thumbnails. Pretty selfexplanatory, is only used, because pytorch and imagemagick do not play nice together.
20+
21+
### Frontend
22+
23+
Pretty simple container. In production this is just a static webserver with the build frontend project. The dev version installs the right packages with the right node versions to seamlessly work.
24+
25+
### Proxy
26+
27+
We use a reverse proxy to handle traffic from outside to the frontend and backend. We use NGNIX for it. Serving actual images and videos is also done with NGINX, because it is better at it then Django.
28+
29+
### Database
30+
31+
This is usually Postgres, but maybe could be different databases in the future. However there are still two or three features depending on Postgres running.

0 commit comments

Comments
 (0)