**This wiki serves as a central repository for all information about deployment, configuration, architecture, and operational procedures of 19squared.**
...
...
@@ -9,8 +7,6 @@
## Demo Video I
[](https://www.youtube.com/watch?v=uk9fABJgWFI)
@@ -129,16 +132,15 @@ For details about the development server, please refer to the project's [README]
Before running the project, create a `.env` file from the `.env.template` to set database credentials, API endpoints, and more. Then, after running `docker compose up -d --build`, Docker is running the following containers by default:
To make your application accessible, you'll want to route external traffic to the `19sq-nginx` container on port `5001`. [Nginx Proxy Manager](https://nginxproxymanager.com/) might simplify the setup of a reverse proxy. It provides an interface for:
...
...
@@ -150,7 +152,7 @@ To make your application accessible, you'll want to route external traffic to th
A GitLab pipeline was developed inside the `.gitlab-ci.yml` for automatic testing and deploying on a stage and production server. After installing a GitLab runner with the `stage` and `main` tags on the according server and starting it with `cd / && gitlab-runner run &`, code will be tested and deployed fully automated. The config.toml could look like the following.
````
```
concurrent = 1
check_interval = 20
connection_max_age = "60m0s"
...
...
@@ -169,18 +171,18 @@ shutdown_timeout = 0
token_expires_at = 0001-01-01T00:00:00Z
executor = "shell"
user = "gitlab-runner"
````
```
**Important:** When using a similar approach, make sure that the `gitlab-runner` user is allowed to execute Docker commands but no security relevant commands. The following commands create the user and grant the required permissions.
````
```
sudo useradd -m -s /bin/bash gitlab-runner
getent group docker | cut -d: -f3
sudo usermod -aG <group_id> gitlab-runner
sudo systemctl stop gitlab-runner
sudo systemctl daemon-reload
sudo systemctl start gitlab-runner
````
```
## Proposed (V-)Server Setup Guide
...
...
@@ -230,7 +232,8 @@ When deploying your instance, consider employing Cloudflare to enhance performan
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 ~$10 per year on [Cloudflare Registrar](https://www.cloudflare.com/de-de/products/registrar/).
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 \~$10 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.
@@ -239,8 +242,6 @@ Cloudflare Tunnels offer a cost-effective and secure way to deploy a 19squared i
The following video shows all steps needed to deploy the application using a Cloudflare tunnel.
[](https://www.youtube.com/watch?v=t-RPpB83htg)
### Step-by-Step Guide
Perform the following steps on the machine you want to use as your server.
...
...
@@ -273,23 +274,21 @@ This section explains how to generate client IDs and client secrets for Google,
1.**Create a Project:**
* Go to the [Google Cloud Console](https://console.cloud.google.com/).