From bb919c50ab21cefa78ac667471090c090121a60f Mon Sep 17 00:00:00 2001 From: CDaut Date: Sun, 18 Dec 2022 12:10:04 +0100 Subject: [PATCH] documented enviroment variables --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fd274b..76a996b 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,14 @@ In order for this project to work you must set up some enviroment variables: - `DJANGO_SECRET_KEY` the secret key used by Django which should obviously be kept secret - `DJANGO_DEBUG` indicates whether the Django server runs in Debug mode or not. Should be False iff the server runs in production - `SALT_KEY` some type of hash salt the [2fa provider needs](https://github.com/neutron-sync/django-2fa/blob/main/docs/config.md#environmental-variables---required). Use a 36 character string. - +- `ENABLE_NEXTCLOUD_OAUTH` `True` iff you wish to enable nextcloud oauth login +- `NC_OAUTH_CLIENT_ID` the OAuth client_id provided by nextcloud +- `NC_OAUTH_CLIENT_SECRET` the OAuth client secret provided by nextcloud +- `NC_BASE_URL` the base URL of the nextcloud instance (e.g. https://cloud.example.com/) +- `REQUESTS_CA_BUNDLE` an envvar read by the requests module. Enables you to pass a custom certificate bundle e.g. if your nextcloud instance uses a LetsEncrypt certificate +- `TIMEZONE` the server timezone. Needs to be accurate for OAuth to work. Example: `Europe/Berlin`. ### Docker -After saving the above mentioned enviroment variables in a `envvars.env` file (or adjusting the `docker-compose.yml` to use a different .env file) only a `docker compose up` should be required to bring the project up. +After saving the above-mentioned enviroment variables in a `envvars.env` file (or adjusting the `docker-compose.yml` to use a different .env file) only a `docker compose up` should be required to bring the project up. ### Migrate To initialize the Database you need to run a Django migration. To do this you enter the docker container via `docker exec -it mdblog-web-1 /bin/bash` and running the command `python3 manage.py migrate`. After that the DB should be set up and the project is accessible at [127.0.0.1:8000](127.0.0.1:8000). If not you can try putting a https:// before the URL.