From 06423c0f4b75d792eb81fab3debc6a1026698354 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Wed, 3 Jan 2024 18:23:46 +0100 Subject: [PATCH] :sparkles: Closes #327 --- .pre-commit-config.yaml | 2 + docker-compose.yml | 55 ++++-- .../src/routes/docs/self-host/+page.svelte | 181 ++++-------------- 3 files changed, 86 insertions(+), 152 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6da7f474..b8e4c2d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,8 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + args: + - --allow-multiple-documents # - id: check-added-large-files - repo: https://github.com/psf/black diff --git a/docker-compose.yml b/docker-compose.yml index 8ca3b5e6..bdcbdbac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,21 +26,52 @@ services: - redis environment: &env_vars - DB_URL: "postgresql://postgres:classquiz@db:5432/classquiz" - REDIS: "redis://redis:6379/0?decode_responses=True" + # --- DON'T CHANGE FROM HERE --- + DB_URL: "postgresql://postgres:classquiz@db:5432/classquiz" # DON'T CHANGE + REDIS: "redis://redis:6379/0?decode_responses=True" # DON'T CHANGE + SECRET_KEY: "TOP_SECRET" # Don't change it manually, use the one-liner provided in the documentation + MAX_WORKERS: "1" # Very important and DON'T CHANGE + ACCESS_TOKEN_EXPIRE_MINUTES: 30 # DON'T CHANGE + MEILISEARCH_URL: "http://meilisearch:7700" # DON'T CHANGE + # -- DON'T CHANGE TILL HERE --- + + # --- MAIL CONFIG --- + MAIL_PORT: "587" MAIL_ADDRESS: "email@email@email.email" MAIL_PASSWORD: "PASSWORT" MAIL_USERNAME: "email@email@email.email" MAIL_SERVER: "email@email@email.emai" - MAX_WORKERS: "1" # Very important - MAIL_PORT: "587" - SECRET_KEY: "mysecretkey" - ACCESS_TOKEN_EXPIRE_MINUTES: 30 - SKIP_EMAIL_VERIFICATION: True - HCAPTCHA_KEY: "HCAPTCHA_PRIVATE_KEY" - MEILISEARCH_URL: "http://meilisearch:7700" - STORAGE_BACKEND: "local" - STORAGE_PATH: "/app/data" + SKIP_EMAIL_VERIFICATION: "True" # Does the user have to confirm its email by clicking a link? + + # --- EXTERNAL API CONFIG --- + # HCAPTCHA_KEY: "HCAPTCHA_PRIVATE_KEY" + # PIXABAY_API_KEY: "" # Get it from here: https://pixabay.com/api/docs/ + # RECAPTCHA_KEY: "" Get it from Google for the Captcha. + + # -- STORAGE CONFIG --- + STORAGE_BACKEND: "local" # Could also be s3 + STORAGE_PATH: "/app/data" # When s3 is used, this isn't needed. + # If STORAGE_BACKEND is "s3" + #S3_ACCESS_KEY: "YOUR_ACCESS_KEY" + #S3_SECRET_KEY: "YOUR_SECRET_KEY" + #S3_BASE_URL: "YOUR_S3_BASE_URL" + + # --- GOOGLE_AUTH --- + #GOOGLE_CLIENT_ID: "" # Your Google-Client ID, or leave it unset if you don't want it. + #GOOGLE_CLIENT_SECRET: "" # Your Google-Client Secret, or leave it unset if you don't want it. + + # --- GITHUB_AUTH --- + #GITHUB_CLIENT_ID: "" # Your GitHub-Client ID, or leave it unset if you don't want it. + #GITHUB_CLIENT_SECRET: "" # Your GitHub-Client Secret, or leave it unset if you don't want it. + + # --- Custom OpenID --- + #CUSTOM_OPENID_PROVIDER__CLIENT_ID: "" # Adjust if needed + #CUSTOM_OPENID_PROVIDER__CLIENT_SECRET: "" # Adjust if needed + #CUSTOM_OPENID_PROVIDER__SERVER_METADATA_URL: "/.well-known/openid-configuration" # Adjust if needed + + volumes: # Only needed if you chose the "local" storage-backend + - ./uploads:/var/storage + redis: image: redis:alpine restart: always @@ -66,7 +97,7 @@ services: volumes: - ./Caddyfile-docker:/etc/caddy/Caddyfile ports: - - "8000:8080" + - "8000:8080" # The 8000 can be changed. meilisearch: image: getmeili/meilisearch:v0.28.0 restart: always diff --git a/frontend/src/routes/docs/self-host/+page.svelte b/frontend/src/routes/docs/self-host/+page.svelte index 4752fcfb..ea9c95a1 100644 --- a/frontend/src/routes/docs/self-host/+page.svelte +++ b/frontend/src/routes/docs/self-host/+page.svelte @@ -3,7 +3,7 @@ SPDX-FileCopyrightText: 2023 Marlon W (Mawoka) SPDX-License-Identifier: MPL-2.0 --> -