📝 Updated docs with warning

This commit is contained in:
Mawoka
2022-04-01 22:30:40 +02:00
parent 0ec7c2b519
commit 70ccf6359d
3 changed files with 80 additions and 65 deletions
+33 -20
View File
@@ -1,4 +1,4 @@
<script lang='ts'>
<script lang="ts">
import { onMount } from 'svelte';
import '$lib/hljs.css';
@@ -11,33 +11,42 @@
<svelte:head>
<title>ClassQuiz/docs - Self-Host</title>
<meta
name='description'
content='How to self-host ClassQuiz, the open-source quiz-application'
name="description"
content="How to self-host ClassQuiz, the open-source quiz-application"
/>
</svelte:head>
<article
class='prose prose-sm sm:prose lg:prose-lg xl:prose-xl mx-auto mt-10 prose-pink text-yellow-50 px-4'
class="prose prose-sm sm:prose lg:prose-lg xl:prose-xl mx-auto mt-10 prose-pink text-yellow-50 px-4"
>
<h1>Self-Hosting</h1>
<p>Since ClassQuiz is open-source, it can also be self-hosted.</p>
<h2>Warning</h2>
<p>
Since ClassQuiz is in pretty early development, breaking changes come and go! Please check
these docs again before updating your instance. I may also add more dependencies like <a
href="https://typesense.org/">Typesense</a
>
ore something similar in the future, but I'll always provide a
<code>docker-compose.yml</code> file, so the self-hosting process is still easy.
</p>
<h2>Requirements</h2>
<ul>
<li><a href='https://docker.com'>Docker</a></li>
<li><a href='https://git-scm.com/'>Git</a></li>
<li><a href="https://docker.com">Docker</a></li>
<li><a href="https://git-scm.com/">Git</a></li>
<li>
A <a href='https://redis.com'>Redis</a>-Server (I recommend
<a href='https://upstash.com'>Upstash</a>)
A <a href="https://redis.com">Redis</a>-Server (I recommend
<a href="https://upstash.com">Upstash</a>)
</li>
</ul>
<h2>Installation</h2>
<p>At first, clone the repo:</p>
<pre><code class='language-bash'
>git clone https://github.com/mawoka-myblock/classquiz && cd ClassQuiz</code
></pre>
<pre><code class="language-bash"
>git clone https://github.com/mawoka-myblock/classquiz && cd ClassQuiz</code
></pre>
<p>
Now, set a <b>VALID</b> Redis-URI in <code>frontend/Dockerfile</code> and, if you want Sentry,
set a valid Sentry-DSN.
@@ -49,25 +58,29 @@
<h2>Configuration</h2>
<h3>Storage Provider</h3>
<p>
You'll have to set up a storage provider for some pictures (these getting imported from KAHOOT!). For now, you
can use <a href='https://deta.sh'>Deta</a> or the local filesystem. Please note that I would <b>NOT</b> use it
because of these funny path-things. I tried to prevent these attacks, but i really wouldn't trust it.
You'll have to set the <code>STORAGE_BACKEND</code>-environment-variable to either <code>deta</code> or <code>local</code>.
You'll have to set up a storage provider for some pictures (these getting imported from
KAHOOT!). For now, you can use <a href="https://deta.sh">Deta</a> or the local filesystem.
Please note that I would <b>NOT</b> use it because of these funny path-things. I tried to
prevent these attacks, but i really wouldn't trust it. You'll have to set the
<code>STORAGE_BACKEND</code>-environment-variable to either <code>deta</code> or
<code>local</code>.
</p>
<h4>If you chose Deta...</h4>
<p>
...you'll also have to set the <code>DETA_PROJECT_KEY</code> and the <code>DETA_PROJECT_ID</code>.
...you'll also have to set the <code>DETA_PROJECT_KEY</code> and the
<code>DETA_PROJECT_ID</code>.
</p>
<h4>If you chose the local filesystem...</h4>
<p>
...you'll have to set the <code>STORAGE_PATH</code> enviromnent variable. The path must be absolute (so start with a <code>/</code>).
...you'll have to set the <code>STORAGE_PATH</code> enviromnent variable. The path must be
absolute (so start with a <code>/</code>).
</p>
<p>
Before you can start your stack, you have to set some environment-variables in your
<code>docker-compose.yml</code>.
</p>
<pre><code class='language-yaml'
>version: "3"
<pre><code class="language-yaml"
>version: "3"
services:
frontend:
@@ -143,5 +156,5 @@ volumes:
data:
</code></pre>
<p>Now build and deploy:</p>
<pre><code class='language-bash'>docker compose build && docker compose up -d</code></pre>
<pre><code class="language-bash">docker compose build && docker compose up -d</code></pre>
</article>