Skip to content

Commit

Permalink
暂停闲置的chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryJi529 committed Mar 4, 2024
1 parent d7d63f0 commit b222730
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 36 deletions.
2 changes: 1 addition & 1 deletion extension/background.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
chrome.commands.onCommand.addListener((command) => {
switch (command) {
case "chat":
chrome.tabs.create({ url: "https://chatbot.morningstar369.com/" });
chrome.tabs.create({ url: "https://chat.morningstar369.com/" });
break;
case "nav":
chrome.tabs.create({ url: "https://morningstar369.com/nav/" });
Expand Down
3 changes: 1 addition & 2 deletions extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
},
"share": {
"suggested_key": {
"default": "Alt+Shift+S",
"mac": "Alt+Shift+S"
"default": "Alt+Shift+S"
},
"description": "Open Morningstar Share"
}
Expand Down
24 changes: 12 additions & 12 deletions scripts/deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,18 @@ services:
# - "6004:3000"
# - "222:22"

chatbot:
build:
context: .
dockerfile: chatbot/Dockerfile
image: henry529/chatbot:latest
container_name: morningstar_chatbot
hostname: henry-chatbot
working_dir: /root
tty: true
restart: unless-stopped
ports:
- "6005:3000"
# chatbot:
# build:
# context: .
# dockerfile: chatbot/Dockerfile
# image: henry529/chatbot:latest
# container_name: morningstar_chatbot
# hostname: henry-chatbot
# working_dir: /root
# tty: true
# restart: unless-stopped
# ports:
# - "6005:3000"

jellyfin:
image: jellyfin/jellyfin
Expand Down
36 changes: 18 additions & 18 deletions scripts/deploy/nginx/conf/others.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ upstream matomo.morningstar369.com {
# upstream gitea {
# server 43.154.26.218:6004;
# }
upstream chatbot {
server 43.154.26.218:6005;
}
# upstream chatbot {
# server 43.154.26.218:6005;
# }
upstream jellyfin {
server 43.154.26.218:6006;
}
Expand Down Expand Up @@ -90,22 +90,22 @@ server {
# add_header X-Proxy-Cache $upstream_cache_status;
# }
# }
server {
listen 80;
client_max_body_size 200m;
server_name chatbot.morningstar369.com;
location / {
proxy_pass http://chatbot;
index index.html;
proxy_cache custom_cache;
proxy_cache_valid any 5m;
add_header X-Proxy-Cache $upstream_cache_status;
# server {
# listen 80;
# client_max_body_size 200m;
# server_name chatbot.morningstar369.com;
# location / {
# proxy_pass http://chatbot;
# index index.html;
# proxy_cache custom_cache;
# proxy_cache_valid any 5m;
# add_header X-Proxy-Cache $upstream_cache_status;

if ($uri = '/') {
rewrite ^ /zh permanent; # 将 / 路径重定向到 /zh 路径
}
}
}
# if ($uri = '/') {
# rewrite ^ /zh permanent; # 将 / 路径重定向到 /zh 路径
# }
# }
# }
server {
listen 80;
client_max_body_size 200m;
Expand Down
10 changes: 7 additions & 3 deletions scripts/fabric/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
DOMAIN_LIST = [
"morningstar369.com",
"beancount.morningstar369.com",
"chatbot.morningstar369.com",
# "chatbot.morningstar369.com",
"code.morningstar369.com",
"frps.morningstar369.com",
"jellyfin.morningstar369.com",
Expand Down Expand Up @@ -96,7 +96,9 @@ def updateDjango(c):
commandTemplate = (
"docker exec -it morningstar_nginx certbot --nginx --non-interactive"
)
c.run(commandTemplate + " -d " + " -d ".join(DOMAIN_LIST)) # NOTE:解决HTTPS失效问题
c.run(
commandTemplate + " -d " + " -d ".join(DOMAIN_LIST)
) # NOTE:解决HTTPS失效问题
print("Done!!")


Expand Down Expand Up @@ -266,6 +268,8 @@ def syncNginx(c):
commandTemplate = (
"docker exec -it morningstar_nginx certbot --nginx --non-interactive"
)
c.run(commandTemplate + " -d " + " -d ".join(DOMAIN_LIST)) # NOTE:解决HTTPS失效问题
c.run(
commandTemplate + " -d " + " -d ".join(DOMAIN_LIST)
) # NOTE:解决HTTPS失效问题

print("Done!!")

0 comments on commit b222730

Please sign in to comment.