跳轉到

GCP 基礎設施與伺服器維運

伺服器資訊與 Port 規劃

  • 主機 IP: 34.28.104.222
  • 服務端口分流規劃:
  • 80 / 443:Nginx / Caddy 統一反向代理入口(未來掛載 SSL 憑證)
  • 3000:私有代碼託管鏡像(Gitea)
  • 8080:MkDocs 靜態文檔站(或反向代理至 /docs)
  • 8000:後端 API 與 AI 安全閘道服務

GCP VPC 防火牆設定提醒

若直接透過 http://34.28.104.222:8080 存取文檔,請確認 GCP VPC 防火牆已放行 tcp:8080:

gcloud compute firewall-rules create allow-mkdocs \
    --direction=INGRESS --priority=1000 --network=default --action=ALLOW \
    --rules=tcp:8080 --source-ranges=0.0.0.0/0

未來 HTTPS 升級路徑(採用 Nginx + Certbot)

當購買網域(如 teqais.com)後,建議透過 Nginx 統一監聽 443 並掛載 Let's Encrypt 免費憑證:

server {
    listen 80;
    server_name docs.teqais.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name docs.teqais.com;

    ssl_certificate /etc/letsencrypt/live/docs.teqais.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/docs.teqais.com/privkey.pem;

    location / {
        root /home/user/workspace/mkdocs_site;
        index index.html;
        try_files $uri $uri/ =404;
    }
}