Chou Tzu Chieh
9f28e652b3
- Added ".example-env" with necessary configuration placeholders. - Updated README.md with detailed setup instructions for Ngrok and Drone CI, including running in different modes. - Renamed the container from "ngrok_container" to "ngrok". - Added "start_with_domain.sh" for users opting to use a predefined Ngrok domain. - Modified "start.sh" to support starting Ngrok without a domain. - Updated "stop.sh" to align with the new container name. |
||
---|---|---|
.example-env | ||
.gitignore | ||
LICENSE | ||
README.md | ||
docker-compose.yml | ||
start.sh | ||
start_with_domain.sh | ||
stop.sh |
README.md
Drone CI with Ngrok and Docker
Setting up Drone CI for Github provider with Ngrok and Docker Compose
Getting started
Expose local 8080 port using Ngrok
$ export NGROK_AUTH_TOKEN=YOUR_NGROK_AUTH_TOKEN
# run with domain
$ export NGROK_DOMAIN=YOUR_NGROK_DOMAIN
$ docker run --name ngrok_container --net=host -it -e NGROK_AUTHTOKEN=${NGROK_AUTH_TOKEN} ngrok/ngrok:latest http --domain=${NGROK_DOMAIN} 8080
# run with randomly generated domain by Ngrok
$ docker run --name ngrok_container --net=host -it -e NGROK_AUTHTOKEN=${NGROK_AUTH_TOKEN} ngrok/ngrok:latest http 8080
Start Drone with Docker Compose
$ export DRONE_GITHUB_CLIENT_ID=YOUR_GITHUB_CLIENT_ID >> .env
$ export DRONE_GITHUB_CLIENT_SECRET=YOUR_GITHUB_CLIENT_SECRET >> .env
$ export DRONE_RPC_SECRET=YOUR_DRONE_RPC_SECRET >> .env
$ export DRONE_SERVER_HOST=YOUR_DRONE_SERVER_HOST >> .env
$ docker compose up -d
Quick Start
If .env
file is already set up (Simply edit the .example-env
file and then rename it to .env
)
Running Drone CI in the Background
If you have set up NGROK_DOMAIN
in .env
file:
$ chmod +x start_with_domain.sh
$ ./start_with_domain.sh
Start Ngrok without NGROK_DOMAIN
:
$ chmod +x start.sh
$ ./start.sh
Stop Drone CI and Ngrok
$ chmod +x stop.sh
$ ./stop.sh