Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leptonyu/ngrokd-in-docker
Ngrokd server in docker
https://github.com/leptonyu/ngrokd-in-docker
Last synced: 24 days ago
JSON representation
Ngrokd server in docker
- Host: GitHub
- URL: https://github.com/leptonyu/ngrokd-in-docker
- Owner: leptonyu
- Created: 2016-07-23T14:09:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-01T15:38:05.000Z (almost 8 years ago)
- Last Synced: 2024-10-30T00:48:42.313Z (2 months ago)
- Language: Shell
- Size: 512 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ngrok in docker
===Docker compose config
```
ngrok:
image: icymint/ngrokd
volumes:
- /etc/letsencrypt/live/ngrok.icymint.me/fullchain.pem:/snakeoil.crt
- /etc/letsencrypt/live/ngrok.icymint.me/privkey.pem:/snakeoil.key
ports:
- 4443:4443
- 80:80
- 443:443
```Build your own image
```
DOMAIN=youdomain.com ./build.sh
```Use nginx
```
map $scheme $proxy_port {
"http" "80";
"https" "443";
"default" "80";
}server {
listen 80;
include /etc/nginx/ssl.conf;
server_name .ngrok.icymint.me; // replace with your own domain
ssl_certificate /etc/letsencrypt/live/ngrok.icymint.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ngrok.icymint.me/privkey.pem;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass $scheme://localhost:$proxy_port; // replace with ngrokd docker inner ip or localhost
}
}
```build ngrok client
```
./build-client.sh
```If you use letsencrypt to create ssl certs, here is the relationship
```
/etc/letsencrypt/ngrok.icymint.me/chain.pem assets/client/tls/ngrokroot.crt
/etc/letsencrypt/ngrok.icymint.me/fullchain.pem assets/server/tls/snakeoil.crt
/etc/letsencrypt/ngrok.icymint.me/privkey.pem assets/server/tls/snakeoil.key
```