From a2af09075ff1165c70346ffa04340721f831bf4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 13 Apr 2022 01:48:59 +0200 Subject: [PATCH] Remove extras folder --- extras/discord-embed.service | 17 ------- extras/discord-embed.socket | 11 ---- extras/nginx.conf | 98 ------------------------------------ 3 files changed, 126 deletions(-) delete mode 100644 extras/discord-embed.service delete mode 100644 extras/discord-embed.socket delete mode 100644 extras/nginx.conf diff --git a/extras/discord-embed.service b/extras/discord-embed.service deleted file mode 100644 index 7ad6ebb..0000000 --- a/extras/discord-embed.service +++ /dev/null @@ -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 diff --git a/extras/discord-embed.socket b/extras/discord-embed.socket deleted file mode 100644 index 05237db..0000000 --- a/extras/discord-embed.socket +++ /dev/null @@ -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 \ No newline at end of file diff --git a/extras/nginx.conf b/extras/nginx.conf deleted file mode 100644 index f021145..0000000 --- a/extras/nginx.conf +++ /dev/null @@ -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; - } - -}