Remove extras folder
This commit is contained in:
@ -1,17 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=discord-embed
|
|
||||||
Requires=discord-embed.socket
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=notify
|
|
||||||
# Change lovinator to your username
|
|
||||||
User=lovinator
|
|
||||||
Group=lovinator
|
|
||||||
ExecStart=/home/lovinator/.local/bin/poetry run gunicorn --workers=3 --threads=3 -k uvicorn.workers.UvicornWorker --bind unix:/run/discord-embed.sock --access-logfile /var/log/discord-embed/access.log --error-logfile /var/log/discord-embed/error.log main:app
|
|
||||||
WorkingDirectory=/home/lovinator/discord-embed
|
|
||||||
Environment="DOMAIN=https://i.lovinator.space/"
|
|
||||||
Restart=on-failure
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Socket that Nginx will use to communicate with Gunicorn.
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=/run/discord-embed.sock
|
|
||||||
|
|
||||||
# Change this to the user that runs nginx. On Arch it is http, on others it is www-data. You can check with "ps aux | grep nginx"
|
|
||||||
SocketUser=http
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sockets.target
|
|
@ -1,98 +0,0 @@
|
|||||||
worker_processes auto;
|
|
||||||
events {
|
|
||||||
multi_accept on;
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
http {
|
|
||||||
charset utf-8;
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
types_hash_max_size 4096;
|
|
||||||
types_hash_bucket_size 64;
|
|
||||||
server_tokens off;
|
|
||||||
client_max_body_size 0M;
|
|
||||||
set_real_ip_from 192.168.1.31;
|
|
||||||
|
|
||||||
# MIME
|
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
# Log Format
|
|
||||||
log_format cloudflare '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $http_cf_ray $http_cf_connecting_ip $http_x_forwarded_for $http_x_forwarded_proto $http_true_client_ip $http_cf_ipcountry $http_cf_visitor $http_cdn_loop';
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
access_log /var/log/nginx/access.log cloudflare;
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
|
||||||
|
|
||||||
# Load configs
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
# This is the URL where we will upload images to
|
|
||||||
server_name upload.lovinator.space;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
# discord-embed needs to be running before we can use it
|
|
||||||
location / {
|
|
||||||
proxy_pass http://unix:/run/discord-embed.sock;
|
|
||||||
}
|
|
||||||
|
|
||||||
# logging
|
|
||||||
access_log /var/log/nginx/lovinator.space.access.log cloudflare;
|
|
||||||
error_log /var/log/nginx/lovinator.space.error.log warn;
|
|
||||||
|
|
||||||
# favicon.ico
|
|
||||||
location = /favicon.ico {
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# robots.txt
|
|
||||||
location = /robots.txt {
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# gzip
|
|
||||||
gzip on;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
# This is the URL that the images will be served from
|
|
||||||
server_name i.lovinator.space;
|
|
||||||
|
|
||||||
# Where the images and videos are stored. Should be the same as "Environment="DOMAIN=https://i.lovinator.space/"" in discord-embed.service
|
|
||||||
root /Uploads;
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ $uri.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# logging
|
|
||||||
access_log /var/log/nginx/lovinator.space.access.log cloudflare;
|
|
||||||
error_log /var/log/nginx/lovinator.space.error.log warn;
|
|
||||||
|
|
||||||
# favicon.ico
|
|
||||||
location = /favicon.ico {
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# gzip
|
|
||||||
gzip on;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user