Remove install instructions and add environment variables
This commit is contained in:
		
							
								
								
									
										40
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								README.md
									
									
									
									
									
								
							@@ -8,41 +8,13 @@ This is useful when you send a video and want it to be playable in Discord.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
This program will create a .html that you will send instead of a .mp4 file. Discord will parse the HTML and create an embed for you. The embed will be the same as the one you would get if you send a .mp4 file.
 | 
					This program will create a .html that you will send instead of a .mp4 file. Discord will parse the HTML and create an embed for you. The embed will be the same as the one you would get if you send a .mp4 file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Installation
 | 
					## Environment variables
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This implies that you have experience with Nginx. Don't be afraid to contact me if you need help.
 | 
					| Variable      | Description                                                      |
 | 
				
			||||||
 | 
					| ------------- | ---------------------------------------------------------------- |
 | 
				
			||||||
- Install latest version of [git](https://git-scm.com/), [Python](https://www.python.org/), [Poetry](https://python-poetry.org/docs/#installation) and Nginx.
 | 
					| DOMAIN        | Domain where we server files from, not where we upload files to. |
 | 
				
			||||||
- Clone the repository or download the [source code](https://github.com/TheLovinator1/discord-nice-embed-maker-for-my-yoy/archive/refs/heads/master.zip) directly from GitHub.
 | 
					| UPLOAD_FOLDER | Path to the directory where we store files.                      |
 | 
				
			||||||
- Install the dependencies using [Poetry](https://python-poetry.org/docs/#installation).
 | 
					| WEBHOOK_URL   | Discord Webhook URL                                              |
 | 
				
			||||||
  - `poetry install`
 | 
					 | 
				
			||||||
- Rename .env.example to .env and fill in the required values.
 | 
					 | 
				
			||||||
- Copy discord-embed.service to /etc/systemd/system/discord-embed.service.
 | 
					 | 
				
			||||||
  - `sudo cp discord-embed.service /etc/systemd/system/discord-embed.service`
 | 
					 | 
				
			||||||
  - Change lovinator to your username.
 | 
					 | 
				
			||||||
  - Change DOMAIN to the domain where we will serve the files.
 | 
					 | 
				
			||||||
- There is a bundled nginx config file that can be used to serve the site.
 | 
					 | 
				
			||||||
  - `sudo cp nginx.conf /etc/nginx/`
 | 
					 | 
				
			||||||
- Start Nginx at boot.
 | 
					 | 
				
			||||||
  - `sudo systemctl enable --now nginx`
 | 
					 | 
				
			||||||
- Create directory for uploaded files.
 | 
					 | 
				
			||||||
  - `sudo mkdir /Uploads`
 | 
					 | 
				
			||||||
- Check what user is running Nginx, Arch is using http. Others could be www-data:
 | 
					 | 
				
			||||||
  - ps aux | grep nginx
 | 
					 | 
				
			||||||
- Change permissions of /Uploads directory. Change lovinator to your username and http to the user running Nginx.
 | 
					 | 
				
			||||||
  - `sudo chown -R lovinator:http /Uploads`
 | 
					 | 
				
			||||||
- Create log folder.
 | 
					 | 
				
			||||||
  - `sudo mkdir /var/log/discord-embed`
 | 
					 | 
				
			||||||
- Change permissions of /var/log/discord-embed directory. Change lovinator to your username.
 | 
					 | 
				
			||||||
  - `sudo chown -R lovinator:lovinator /var/log/discord-embed`
 | 
					 | 
				
			||||||
- Start the services.
 | 
					 | 
				
			||||||
  - `sudo systemctl enable --now discord-embed.service`
 | 
					 | 
				
			||||||
  - `sudo systemctl enable --now discord-embed.socket`
 | 
					 | 
				
			||||||
- Check if the services are running.
 | 
					 | 
				
			||||||
  - `sudo systemctl status discord-embed.service`
 | 
					 | 
				
			||||||
  - `sudo systemctl status discord-embed.socket`
 | 
					 | 
				
			||||||
- Check logs for errors.
 | 
					 | 
				
			||||||
  - `cat /var/log/discord-embed/error.log` and `cat /var/log/discord-embed/access.log`
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Need help?
 | 
					## Need help?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user