This project sets up Drone CI for Github with Ngrok and Docker Compose.
Go to file
Chou Tzu Chieh 9f28e652b3 Update configs and scripts for Ngrok and Drone CI setup
- 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.
2024-03-26 17:30:36 +08:00
.example-env Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00
.gitignore Add Drone CI setup with Ngrok and Docker Compose 2024-03-03 02:04:02 +08:00
LICENSE Initial commit 2024-03-03 01:57:59 +08:00
README.md Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00
docker-compose.yml Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00
start.sh Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00
start_with_domain.sh Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00
stop.sh Update configs and scripts for Ngrok and Drone CI setup 2024-03-26 17:30:36 +08:00

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