Update home authored by Lars Florian Meiendresch's avatar Lars Florian Meiendresch
......@@ -89,6 +89,49 @@ For details about the development server, please refer to the project's [README]
The asset management system includes a garbage collector, accessible via the endpoint `/garbage_collector`. This mechanism is designed to reclaim storage capacity by periodically purging unreferenced assets. Integrating the garbage collector into a routine cron job schedule can optimise server storage utilisation.
# Cloudflare
[Cloudflare](https://www.cloudflare.com/de-de/) is a global cloud platform offering a wide array of services to enhance website performance, security, and reliability. It acts as a powerful Content Delivery Network (CDN) to accelerate content delivery, while also providing robust protection against DDoS attacks and other online threats.
## Content Delivery Network
When deploying your instance, consider employing Cloudflare to enhance performance and user experience. Cloudflare functions as a Content Delivery Network (CDN), a geographically distributed network of servers that caches and delivers static assets (such as images and videos uploaded by users) from a location closer to the user. This reduces latency and improves load times. Furthermore, Cloudflare's caching capabilities can significantly reduce the load on your origin server by storing frequently accessed assets. This improves overall website responsiveness and scalability.
_We use Cloudflare for both CDN and caching functionalities on `19squared.de`, resulting in a faster and more efficient user experience._
**Learn More:** [Cloudflare Docs](https://developers.cloudflare.com/reference-architecture/architectures/cdn/)
## Tunnels
Cloudflare Tunnels offer a cost-effective and secure way to deploy a 19squared instance. With this method, you simply run a server on your local machine (any laptop or PC). Then, a tunnel is established, allowing any internet-connected user to access the server running on your device. In this secure setup, your service communicates with a Cloudflare server, so users do not access the local machine directly.
**Prerequisites:**
1. Top-Level Domain: The domain's registration location is irrelevant. However, it will require configuration changes so that Cloudflare manages its DNS requests. This domain can also support other services after that. Domains are affordable, even as low as ~$5 per year on [Cloudflare Registrar](https://www.cloudflare.com/de-de/products/registrar/).
2. Reasonably Modern Laptop or PC: No need for top-of-the-line hardware, just acceptable performance. If your device isn't ancient, it should suffice for small user groups.
**Learn More:** [Cloudflare Docs](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)
### Walkthrough Video
The following videos shows all steps needed to deploy the application using a Cloudflare tunnel.
**Insert Video**
### Step-by-Step Guide
Perform the following steps on the machine you want to use as your server.
1. [Install the Docker Engine](https://docs.docker.com/engine/install/)
2. [Start 19squared](#production-server)
- `git clone https://git.rwth-aachen.de/medialab/interactive360vr.git`
- `copy .env.template .env`
- `docker compose up -d --build`
3. [Create a Cloudflare Account](https://developers.cloudflare.com/fundamentals/setup/account/create-account/)
4. [Add the Domain to the Cloudflare Account](https://developers.cloudflare.com/fundamentals/setup/manage-domains/add-site/)
5. [Create the Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/)
- **Important:** Use Docker to install `cloudflare/cloudflared` and add `-d --network 19squared_frontend` between `docker run` and `cloudflare/cloudflared` of the provided command.
- **Service URL:** `http://19sq-nginx:80`
# Authentication via Third-Party Services
This section explains how to generate client IDs and client secrets for Google, GitLab, and GitHub to enable user authentication within your application. This project utilises OAuth and Authlib to facilitate secure authentication through these popular third-party services.
......@@ -197,40 +240,3 @@ To apply all pending migrations and update your database to the latest schema, e
docker exec -it 19sq-flask
alembic upgrade head
````
# Cloudflare
[Cloudflare](https://www.cloudflare.com/de-de/) is a global cloud platform offering a wide array of services to enhance website performance, security, and reliability. It acts as a powerful Content Delivery Network (CDN) to accelerate content delivery, while also providing robust protection against DDoS attacks and other online threats.
## Content Delivery Network
When deploying your instance, consider employing Cloudflare to enhance performance and user experience. Cloudflare functions as a Content Delivery Network (CDN), a geographically distributed network of servers that caches and delivers static assets (such as images and videos uploaded by users) from a location closer to the user. This reduces latency and improves load times. Furthermore, Cloudflare's caching capabilities can significantly reduce the load on your origin server by storing frequently accessed assets. This improves overall website responsiveness and scalability.
_We use Cloudflare for both CDN and caching functionalities on `19squared.de`, resulting in a faster and more efficient user experience._
**Learn More:** [Cloudflare Docs](https://developers.cloudflare.com/reference-architecture/architectures/cdn/)
## Tunnels
Cloudflare Tunnels offer a cost-effective and secure way to deploy a 19squared instance. With this method, you simply run a server on your local machine (any laptop or PC). Then, a tunnel is established, allowing any internet-connected user to access the server running on your device. In this secure setup, your service communicates with a Cloudflare server, so users do not access the local machine directly.
**Prerequisites:**
1. Any Domain: The domain's registration location is irrelevant. However, it will require configuration changes so that Cloudflare manages its DNS requests. This domain can also support other services after that. Domains are affordable, even as low as ~$5 per year on [Cloudflare Registrar](https://www.cloudflare.com/de-de/products/registrar/).
2. A Reasonably Modern Laptop or PC: No need for top-of-the-line hardware, just acceptable performance. If your device isn't ancient, it should suffice for small user groups.
**Learn More:** [Cloudflare Docs](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)
### Step-by-Step Guide
Perform the following steps on the machine you want to use as your server.
1. [Install the Docker Engine](https://docs.docker.com/engine/install/)
2. [Start 19squared](#production-server)
- `git clone https://git.rwth-aachen.de/medialab/interactive360vr.git`
- `copy .env.template .env`
- `docker compose up -d --build`
3. [Create a Cloudflare Account](https://developers.cloudflare.com/fundamentals/setup/account/create-account/)
4. [Add the Domain to the Cloudflare Account](https://developers.cloudflare.com/fundamentals/setup/manage-domains/add-site/)
5. [Create the Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/)
- **Important:** Use Docker to install `cloudflare/cloudflared` and add `-d --network 19squared_frontend` between `docker run` and `cloudflare/cloudflared` of the provided command.
- **Service URL:** `http://19sq-nginx:80`