From 20ade9b06b9b42e7ebf1704b9a7d37d4d840c5e3 Mon Sep 17 00:00:00 2001 From: Loudbook Date: Tue, 3 Dec 2024 18:08:37 -0500 Subject: [PATCH] Update README.md --- README.md | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6dd823d..0201ce1 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,14 @@ -
-

PasteBook

-

PasteBook is an aesthetic, effortless way to share your blocks of text. - - [![Static Badge](https://img.shields.io/badge/Website-brightgreen?style=for-the-badge)](https://pastebook.dev) - -

- -# Installation +# PasteBook +An easy on the eyes, portable, fun paste bin written in Svelte and Kotlin. + +## Installation The following is a guide to get PasteBook running on your system under your domain with SSL. All of this was tested on Ubuntu Linux. -## Prerequisites +### Prerequisites - An S3 bucket. In testing, CloudFlare R2 was used. CloudFlare R2 is free. You can learn more [here](https://www.cloudflare.com/developer-platform/products/r2/). - Docker. Both the frontend and backend are to be installed with Docker. You can learn more [here](https://www.docker.com). -## Preparation +### Preparation Start by creating a file named `docker-compose.yml`. Add the content below. ```yml services: @@ -67,7 +62,7 @@ networks: pastebook-network: driver: bridge ``` -## Configuration +### Configuration All of the following values must be changed.
@@ -79,7 +74,7 @@ All of the following values must be changed. `VITE_API_URL` - The full endpoint of the API. When locally testing this is `http://localhost:8080`. In my case, when in production, it would be `https://api.pastebook.dev/`. -## Creation +### Creation Run the following. ``` docker-compose up @@ -87,22 +82,21 @@ docker-compose up Awesome! PasteBook is now running. -# Nginx Configuration +## Nginx Configuration In order to run PasteBook under a domain, you will need to use a reverse proxy. The following will serve as a guide to setting up Nginx. -## Prerequisites +### Prerequisites - PasteBook is fully installed with the instructions above. - A working Nginx installation. Learn more [here](https://nginx.org/en/linux_packages.html#instructions). - A working Certbot installation. Learn more [here](https://certbot.eff.org/instructions?ws=nginx&os=snap). ## Preparation Navigate to `/etc/nginx/sites-enabled`. Create a file under the name `pastebook.conf` and add the following content: -```conf +```nginx server { listen 80; server_name - # Redirect HTTP to HTTPS location / { return 301 https://$host$request_uri; } @@ -144,16 +138,16 @@ server { } ``` -## Configuration +### Configuration `` - Change this to your domain name. For example, mine is `pastebook.dev`. -## SSL Configuration +### SSL Configuration Run the following, with `` changed to your domain. ``` sudo certbot --nginx -d -d api. ``` -## Committing Changes +### Committing Changes Run the following. ``` systemctl restart nginx