From 19852dd5add870be395499285726c41e6c3e5df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 27 Jan 2025 19:26:31 +0100 Subject: [PATCH] Fix issues from PR #27. Ready to be merged. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f73898c..378f9b8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Installation ### Prerequisites -Shimatta Kenkyusho (しまった・研究所) is a Django based web application. It is highly recommended to run it using the supplied docker setup. This removes the need of any special installation on the host system. This guide assumes, that `nginx` is running on the host system and can serve as a reverse proxy and webserver. For easiest download, it is recommended to clone the desired release with `git` +Shimatta Kenkyusho (しまった・研究所) is a Django based web application. It is highly recommended to run it using the supplied docker setup. This removes the need of any special installation on the host system. This guide assumes, that `nginx` is running on the host system and can serve as a reverse proxy and webserver. For easiest download, it is recommended to clone the desired release with `git`. Install the requirements: @@ -36,7 +36,7 @@ The following settings are required to be adapted: - `DJANGO_STATIC_VOL`: The directory the application will extract its static data into, which needs to be served by your webserver. See the example reverse proxy setup for more details. - `DJANGO_MEDIA_VOL`: The directory all media files like images uploaded to the application are stored here. This folder must be served by your webserver on the configured media URL. - `PGDATA_VOL`: The directory, the postgres database will store its files. -- `PORT`: The TCP/IP port that the whole setup will listen on. Use a reverse proxy to forward to this port. Do not directly expose it to the internet! +- `PORT`: The TCP/IP port that the whole setup will listen on. Use a reverse proxy to forward to this port. *Do not directly expose it to the internet!* - `DJANGO_SECRET_KEY`: Provide a secret, and randomly generated key. Do not share this with anybody! - `DJANGO_ALLOWED_HOST`: Set this to the domain, the application will be reached at. E.g: `lab.example.com` - `DJANGO_MEDIA_URL`: Set this to the media URL at which your webserver serves the `DJANGO_MEDIA_VOL` diretory. E.g: `media.lab.example.com/` Note the **slash at the end**. It is important. @@ -57,7 +57,7 @@ Start the application as a service with ``` $ docker compose up -d ``` -> Note: The initial startup might need a minute because the whole database etc needs to be initialized first. +> Note: The initial startup might need a minute because the whole database etc. needs to be initialized first. Use ``` @@ -66,7 +66,7 @@ $ docker ps to check if the `shimatta-kenkyusho-shimatta-kenkyusho-db` and the `shimatta-kenkyusho-shimatta-kenkyusho-web` container are running and report a *healthy status*. ### Setup Initial Login User -When started the for the first time with a fresh database without any superuser configured, a superuser `admin` with password `admin` will be automatically generated. +When started for the first time with a fresh database without any superuser configured, a superuser `admin` with password `admin` will be automatically generated. Use this user to login for the first time. In the django admin panel you can then either change the password of the `admin` user or create a new superuser with your own username and delete the `admin` user. As long as there is at least one superuser configured, no admin user will be regenerated upon startup. @@ -74,7 +74,7 @@ As long as there is at least one superuser configured, no admin user will be reg ### Example Reverse Proxy Setup Using nginx Once the setup is configured the reverse proxy setup is needed. This setup serves three purposes: 1. Redirect incoming requests to the django application running on the port `PORT` configured in the `.env` -2. Serve static files ath the URL: (e.g. `lab.example.com/static`). See `ALLOWED_HOST` configuration. +2. Serve static files at the URL: (e.g. `lab.example.com/static`). See `ALLOWED_HOST` configuration. 3. Serve the media volume at the media URL (e.g. `media.lab.example.com`). See `DJANGO_MEDIA_URL` Example nginx configuration for `nginx >v2.25` with SSL and http2 / http3 support: