# <span style="color: cyan">SERVEO</span> ### 讓你用 <span style="color: lime">Docker</span> 開發 ### chatbot 也能過的去 <!-- Put the link to this slide here so people can follow --> <small style="margin-top: 10rem">簡報: https://lihi1.cc/hZ1pK</small> Note: 共筆:<https://hackmd.io/wXaMu-2MQc2ezyM-rLbbAg> --- ## Who am I? <table class="about-me"> <tr> <td><img src="https://i.imgur.com/2MS1l2l.jpg" class="avatar"></td> <td> <ul> <li>戴均民</li> <li>現職 <span style="color: #e2231a">微程式資訊</span></li> <li>後端工程師</li> <li><a href="https://github.com/taichunmin/" target="_blank"><i class="fa fa-fw fa-github"></i>taichunmin</a></li> </ul> </td> </tr> </table> --- #### 相信不少人都用過 NGROK ![](https://i.imgur.com/qTgSpyF.png) --- ![](https://i.imgur.com/eKKhYXh.png) --- ## 隨機 DOMAIN ![](https://i.imgur.com/vLPfn4Y.png) --- ## 一次只能開一個 ![](https://i.imgur.com/Ybg9Gu0.png) --- ## 40 個連線 / 分 ![](https://i.imgur.com/UALY6aS.png) --- ![](https://i.imgur.com/ub4Oeoz.jpg) --- ![](https://i.imgur.com/xQbGULI.png) --- ## SERVEO 使用教學 ```bash= # 基礎用法 ssh -R 80:localhost:3000 serveo.net # 存取不在本機上的 server ssh -R 80:example.com:80 serveo.net # 指定子網域 ssh -R incubo:80:localhost:8888 serveo.net # 避免 ssh 逾時 ssh -o ServerAliveInterval=60 -R 80:localhost:8888 serveo.net # 斷線自動重連 autossh -M 0 -R 80:localhost:8888 serveo.net ``` --- ## 因為我很常使用 ## Docker 輔助開發 --- ## 所以我就幫 SERVEO ## 做了 <span style="color: lime">Docker Image</span> --- ## <a href="https://hub.docker.com/r/taichunmin/serveo" target="_blank">taichunmin/serveo</a> ![](https://i.imgur.com/fCuZ4jP.png) --- ## 要把<span style="color: lime">其他容器</span>的服務 ## 轉成 HTTPS 很簡單 --- ### `docker-compose.yml` ```yaml= version: '2' services: serveo: image: taichunmin/serveo:latest tty: true stdin_open: true # see https://serveo.net/ for more options command: > autossh -M 0 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -R 80:nginx:80 serveo.net nginx: image: nginx:latest ``` --- # DEMO 1 <https://github.com/taichunmin/coscup-2019-demo> --- ## 在 Docker 裡面 ## 要把<span style="color: lime">本機</span>的服務 ## 轉成 HTTPS 也沒問題 --- ## Windows / macOS ```yaml= version: '2' services: serveo: image: taichunmin/serveo:latest tty: true stdin_open: true # Docker for Windows / macOS command: > autossh -M 0 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -R 80:host.docker.internal:3000 serveo.net ``` --- ## Linux ```yaml= version: '2' services: serveo: image: taichunmin/serveo:latest tty: true stdin_open: true # Docker for Linux command: > HOST_DOMAIN=`ip route|awk '/default/ { print $3 }'` autossh -M 0 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -R 80:$HOST_DOMAIN:3000 serveo.net ``` --- # DEMO 2 <https://github.com/taichunmin/coscup-2019-demo> --- # SERVEO ## 還可以<span style="color: lime">自己架設</span>伺服器 --- ## 所以我幫伺服器版 ## 也做了 <span style="color: lime">Docker Image</span> --- ## <a href="https://hub.docker.com/r/taichunmin/serveo-server" target="_blank">taichunmin/serveo-server</a> ![](https://i.imgur.com/AdQhXOL.png) --- ## 準備<span style="color: lime">一台主機</span> --- ## 準備<span style="color: lime">一台主機</span> ## 準備好你的 <span style="color: cyan">DOMAIN</span> --- ## 準備<span style="color: lime">一台主機</span> ## 準備好你的 <span style="color: cyan">DOMAIN</span> ## 準備一個 <span style="color: orange">HTTPS 憑證</span> --- # DEMO 3 <https://github.com/taichunmin/coscup-2019-demo> --- ## ~~來小小工商一下~~ --- ![](https://i.imgur.com/zr0KBN0.jpg) #### 強力徵求具<span style="color: lime">創新力</span>、<span style="color: cyan">溝通力</span>、<span style="color: orange">正向力</span>的夥伴! <small>⇨ 歡迎中部的朋友 <a href="https://www.104.com.tw/company/1593j10w" target="_blank">加入我們</a></small> --- <table class="about-me"> <tr> <td><img src="https://i.imgur.com/VJac4FR.png" style="height: 600px"></td> <td> <h4>功能</h4> <ul> <li>站點查詢</li> <li>行程規劃</li> <li>最愛場站</li> </ul> <img src="https://i.imgur.com/BCviB4l.png" style="height: 250px; display: block; max-height: none; max-width: none;"> </td> </tr> </table> --- ![](https://i.imgur.com/4EcD6An.jpg) #### 中部最具影響力的資訊社群場地 #### 歡迎<span style="color: cyan">台中</span><span style="color: orange">資訊相關</span>社群來辦活動 <small>⇨ 請洽 <a href="https://www.facebook.com/mpdreamforest/" target="_blank">夢森林粉絲專頁小編</a></small> --- ## Any Question? <table class="table-shield" style="margin-top: 10rem"> <tr> <th>taichunmin/serveo</td> <td> <a href="https://github.com/taichunmin/docker-serveo" target="_blank"> <img class="img-shield" src="https://img.shields.io/github/stars/taichunmin/docker-serveo.svg?logo=github"> </a> </td> <td> <a href="https://hub.docker.com/r/taichunmin/serveo" target="_blank"> <img class="img-shield" src="https://img.shields.io/docker/stars/taichunmin/serveo.svg?logo=docker"> </a> </td> </tr> <tr> <th>taichunmin/serveo-server</td> <td> <a href="https://github.com/taichunmin/docker-serveo-server" target="_blank"> <img class="img-shield" src="https://img.shields.io/github/stars/taichunmin/docker-serveo-server.svg?logo=github"> </a> </td> <td> <a href="https://hub.docker.com/r/taichunmin/serveo-server" target="_blank"> <img class="img-shield" src="https://img.shields.io/docker/stars/taichunmin/serveo-server.svg?logo=docker"> </a> </td> </tr> </table> <style> .reveal { font-family: '微軟正黑體'; } .reveal section img.img-shield { margin: -.2em 0 -.35em 0; border: 0; max-height: none; max-width: none; height: 50px; box-shadow: none; line-height: 1; } table.table-shield { white-space: nowrap; } table.table-shield th { text-align: right; font-size: 70%; } .reveal table.table-shield th, .reveal table.table-shield td { border: 0; } .reveal table.about-me td{ vertical-align: middle; } img.avatar { border-radius: 50%; width: 300px; } .reveal pre code { max-height: 520px; } </style>
{"metaMigratedAt":"2023-06-14T20:29:17.218Z","metaMigratedFrom":"YAML","title":"SERVEO 讓你用 Docker 開發 chatbot 也能過的去","breaks":"true","description":"SERVEO 讓你用 Docker 開發 chatbot 也能過的去","slideOptions":"{\"allottedMinutes\":20}"}
    4592 views