gitlink-cli/showcase/deploy.sh

15 lines
589 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 展示页部署命令(在本地终端手动执行)
# 1. 用 SCP 上传展示页到 ECS需要手动输入密码pd1@YwC#WRFVHkXc8nvu!4
scp "d:/自用/self/word/大三下/软件演化/gitlink-cli/showcase/index.html" root@121.41.210.165:/opt/showcase/index.html
# 2. SSH 到 ECS密码pd1@YwC#WRFVHkXc8nvu!4
ssh root@121.41.210.165
# 登录后在 ECS 上执行:
mkdir -p /opt/showcase
docker run -d --name showcase -p 8080:80 -v /opt/showcase:/usr/share/nginx/html:ro --restart unless-stopped nginx:alpine
# 3. 访问
# 浏览器打开 http://121.41.210.165:8080