Skip to content

一分钟搭建影视站,支持Docker等部署方式

refactor: simplify `.gitignore` and `.dockerignore` (#581)

旋律已经死了。076df04e6e49
diff --git a/.dockerignore b/.dockerignore
index be27913..e0069bd 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,2 +1,11 @@
-.vscode/
-readme.md
\ No newline at end of file
+.github/
+node_modules/
+netlify*
+.gitignore
+.dockerignore
+.env*
+nodemon.json
+vercel.json
+Dockerfile*
+docker-compose*.yml
+.docker/
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 41b23b9..fb27832 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,151 +1,24 @@
-# Created by https://www.toptal.com/developers/gitignore/api/node
-# Edit at https://www.toptal.com/developers/gitignore?templates=node
-
-### Node ###
# Logs
-logs
*.log
-*.log*
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+pnpm-debug.log*
lerna-debug.log*
-.pnpm-debug.log*
-
-# Diagnostic reports (https://nodejs.org/api/report.html)
-report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-*.lcov
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# Bower dependency directory (https://bower.io/)
-bower_components
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (https://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules/
-jspm_packages/
-
-# Snowpack dependency directory (https://snowpack.dev/)
-web_modules/
-
-# TypeScript cache
-*.tsbuildinfo
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Optional stylelint cache
-.stylelintcache
-
-# Microbundle cache
-.rpt2_cache/
-.rts2_cache_cjs/
-.rts2_cache_es/
-.rts2_cache_umd/
-
-# Optional REPL history
-.node_repl_history
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variable files
-.env
-.env.development.local
-.env.test.local
-.env.production.local
-.env.local
-
-# parcel-bundler cache (https://parceljs.org/)
-.cache
-.parcel-cache
-
-# Next.js build output
-.next
-out
-
-# Nuxt.js build / generate output
+node_modules
.DS_Store
-.nitro
-.nuxt
-.output
dist
-!examples/vue2/dist
-
-# Gatsby files
-.cache/
-# Comment in the public line in if your project uses Gatsby and not Next.js
-# https://nextjs.org/blog/next-9-1#public-directory-support
-# public
-
-# vuepress build output
-.vuepress/dist
-
-# vuepress v2.x temp and cache directory
-.temp
-
-# Docusaurus cache and generated files
-.docusaurus
-
-# Serverless directories
-.serverless/
-
-# FuseBox cache
-.fusebox/
-
-# DynamoDB Local files
-.dynamodb/
-
-# TernJS port file
-.tern-port
-
-# Stores VSCode versions used for testing VSCode extensions
-.vscode-test
+dist-ssr
+coverage
+*.local
-# yarn v2
-.yarn/cache
-.yarn/unplugged
-.yarn/build-state.yml
-.yarn/install-state.gz
-.pnp.*
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
.idea
-
-### Node Patch ###
-# Serverless Webpack directories
-.webpack/
-
-# Optional stylelint cache
-
-# SvelteKit build / generate output
-.svelte-kit
-
-# End of https://www.toptal.com/developers/gitignore/api/node
-.user.ini
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644
index b47999a..0000000
--- a/nginx.conf
+++ /dev/null
@@ -1,87 +0,0 @@
-server {
- listen 80;
- server_name localhost;
-
- #access_log /var/log/nginx/host.access.log main;
-
- resolver 114.114.114.114 8.8.8.8 valid=300s;
- resolver_timeout 5s;
-
- # 创建代理路由
- location /proxy/ {
- # 设置CORS头部
- add_header 'Access-Control-Allow-Origin' '*';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
- add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
-
- # OPTIONS请求处理
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Max-Age' 1728000;
- add_header 'Content-Type' 'text/plain charset=UTF-8';
- add_header 'Content-Length' 0;
- return 204;
- }
-
- set $target_url '';
-
- # 执行Lua脚本解析URL
- rewrite_by_lua_file /usr/share/nginx/html/proxy.lua;
-
- proxy_ssl_server_name on;
- proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
-
- # 设置代理头信息
- # 不设置Host,让Nginx自动根据目标URL设置
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- # 处理可能的重定向
- proxy_redirect off;
- proxy_buffering off;
- # 代理超时设置
- proxy_connect_timeout 60s;
- proxy_send_timeout 60s;
- proxy_read_timeout 60s;
-
- proxy_pass $target_url;
- }
-
- location / {
- root /usr/share/nginx/html;
- try_files $uri $uri/ /index.html;
- index index.html index.htm;
- }
-
- #error_page 404 /404.html;
-
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
-
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
-
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- #location ~ \.php$ {
- # root html;
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
- # include fastcgi_params;
- #}
-
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
-}
\ No newline at end of file