From 10ecaee2bd5f4e005b276e99fcca0669266fd116 Mon Sep 17 00:00:00 2001 From: Papin Nikolai Date: Sat, 3 Aug 2024 03:44:47 +0300 Subject: [PATCH] Updated readme file --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4252ed0..4a1c881 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,51 @@ -# personal-website +# Personal Website +This is the source code of my [personal website](https://weirdcat.su). + +# Setup with Docker Compose + +Clone this repository and enter it + +```bash +git clone https://git.weirdcat.su/weirdcat/personal-website +cd personal-website +``` + +Choose the stable branch + +```bash +git checkout stable +``` + +Customize the .env file. Make sure to change the parameters for your site's hostname and PostgreSQL username and password, as well as the environment variables for JWT +``` +# Trusted hostname +HOSTNAME=localhost + +# --- Container ports and hostnames --- + +BACKEND_HOST=personal-site-backend +FRONTEND_HOST=personal-site-frontend +DB_HOST=personal-site-db + +# --- Database settings --- + +DB_USER=postgres +DB_PASSWORD=postgres +DB_DB=data + +# --- JWT token settings --- + +JWT_SECRET=ThisValueIsObviouslyVerySecret +JWT_EXPIRATION_ACCESS=2m # Expiration time for access tokens +JWT_EXPIRATION_REFRESH=7d # Expiration time for refresh tokens +JWT_ISSUER=personal-site +JWT_AUDIENCE=users +``` + +Run the application via docker-compose +```bash +sudo docker-compose up -d +``` +# Setting up reverse proxy +In order to make the application accessible, a reverse proxy must be setup. I'm lazy to explain that now, so it's temporarily recommended to refer to [this article](https://www.linode.com/docs/guides/using-nginx-proxy-manager/).