Skip to content

Commit

Permalink
🎉 version(architecture): v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ting-Code committed Aug 20, 2024
1 parent 08c82a8 commit 91a8c99
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 14 deletions.
71 changes: 70 additions & 1 deletion .github/workflows/dockerBootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,73 @@ docker rmi tingcode/web-admin:latest
# 拉取镜像
docker pull tingcode/web-admin:latest

docker run --rm -d -p 80:80 -p 8680:8680 --name web-admin tingcode/web-admin:latest
docker run --rm -d --net host --name web-admin tingcode/web-admin:latest



user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
# include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
# include /etc/nginx/conf.d/*.conf;
# www.shenmazong.com


server {
listen 80;
listen [::]:80;
server_name 192.168.23.129;
# Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://192.168.23.129:8080;
index index.html index.htm;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

server {
listen 9001;
server_name 192.168.23.129;

location ~ /test/ {
proxy_pass http://192.168.23.129:8080;
index index.html index.htm;
}

location ~ /vod/ {
proxy_pass http://192.168.23.129:8081;
}
}




}
17 changes: 4 additions & 13 deletions .github/workflows/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ http {
server {
# 监听的端口
listen 80;
listen [::]:80;
# 服务器名称
server_name localhost;
server_name 139.199.173.241;

location / {
if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件
Expand Down Expand Up @@ -86,10 +87,11 @@ http {
# 监听的端口
listen 8680;
# 服务器名称
server_name localhost;
server_name 139.199.173.241;
# location /docs 则最后不加/
# location /docs/ 则最后加/
location /docs {
proxy_pass http://139.199.173.241:8680/docs;
if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
Expand All @@ -100,17 +102,6 @@ http {
index index.html;
try_files $uri $uri/ /docs/index.html;
}
# 定义 404 页面
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}

# 定义 50x 页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

0 comments on commit 91a8c99

Please sign in to comment.