diff --git a/Dockerfile b/Dockerfile index 45a1a19..30e0f1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ RUN \ FROM nginx:alpine AS runner COPY --from=builder /app/dist/ /usr/share/nginx/html +COPY --from=builder /app/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d028117 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,36 @@ +events { + worker_connections 4096; +} + +http { + # Log format + log_format main '[$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; + + access_log /dev/stdout main; # Log access to stdout + error_log /dev/stdout; # Log errors to stdout + + include mime.types; # Include the mime types file + default_type application/octet-stream; # Default type + + server { + server_name _; # Listen on all hostnames + listen 80; # Listen on port 80 + + # Gzip + gzip on; + gzip_disable "msie6"; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 8; + gzip_buffers 16 64k; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + # Serve your files + location / { + expires 1h; # Cache files for 1 hour + + # Serve the file directly from disk + try_files $uri $uri/ =404; + } + } +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 381b858..21a215c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,6 +22,7 @@ module.exports = { metajs: false, headers: { name: "ScoreSaber Utils", + author: "fascinated7 (discord)", "run-at": "document-end", match: "https://scoresaber.com/*", updateURL: "https://ssu.fascinated.cc/scripts/bundle.user.js",