changed 6 years ago
Published Linked with GitHub

SERVEO

讓你用 Docker 開發

chatbot 也能過的去

簡報: https://lihi1.cc/hZ1pK

Note:

共筆:https://hackmd.io/wXaMu-2MQc2ezyM-rLbbAg


Who am I?

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
  • 戴均民
  • 現職 微程式資訊
  • 後端工程師
  • taichunmin

相信不少人都用過 NGROK

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →



隨機 DOMAIN


一次只能開一個

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


40 個連線 / 分

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


SERVEO 使用教學

# 基礎用法 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

做了 Docker Image


taichunmin/serveo

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


要把其他容器的服務

轉成 HTTPS 很簡單


docker-compose.yml

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 裡面

要把本機的服務

轉成 HTTPS 也沒問題


Windows / macOS

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

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

還可以自己架設伺服器


所以我幫伺服器版

也做了 Docker Image


taichunmin/serveo-server

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


準備一台主機


準備一台主機

準備好你的 DOMAIN


準備一台主機

準備好你的 DOMAIN

準備一個 HTTPS 憑證


DEMO 3

https://github.com/taichunmin/coscup-2019-demo


來小小工商一下


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

強力徵求具創新力溝通力正向力的夥伴!

⇨ 歡迎中部的朋友 加入我們


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

功能

  • 站點查詢
  • 行程規劃
  • 最愛場站
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

中部最具影響力的資訊社群場地

歡迎台中資訊相關社群來辦活動

⇨ 請洽 夢森林粉絲專頁小編


Any Question?

taichunmin/serveo
taichunmin/serveo-server
Select a repo