Skip to content

Commit

Permalink
Add some explanations for the different containers
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Aug 12, 2023
1 parent b1d02ab commit f61e798
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,30 @@
title: "Development"
sidebar_position: 4
---

## Architecture

Currently the setup is split up into for different containers. In this document the general architecture and reason for the components will be explained

### Backend

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.

In general there are four process running in the backend.

- As a Webserver and for the handling of general API calls we use Gunicorn. Scaling works here with the worker argument Gunicorn provides-
- For long running jobs we use django_q2 with ORM settings. Scaling works here with the HEAVYWORKER env variable.
- 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.
- A thumbnail service, which generates thumbnails. Pretty selfexplanatory, is only used, because pytorch and imagemagick do not play nice together.

### Frontend

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.

### Proxy

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.

### Database

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 comments on commit f61e798

Please sign in to comment.