This project sets up a server to interact with a custom GPT instance, allowing it to read from and write to files, and run Jest tests programmatically.
- Docker
- ngrok account
- Clone the repository:
git clone <repository-url>
cd project
- Create a .env file with your ngrok token and subdomain (if applicable):
echo "NGROK_AUTHTOKEN=your_ngrok_authtoken" > .env
echo "NGROK_SUBDOMAIN=your_subdomain" >> .env
- Build and start the Docker containers using Docker Compose:
docker-compose up --build
- The server should now be running on http://localhost:3000 and exposed via ngrok. If you set a subdomain, the public URL will be https://your_subdomain.ngrok.io. Otherwise, check the ngrok dashboard or logs to get the public URL.
The ngrok service is configured in the docker-compose.yaml
file. Here is the relevant configuration:
ngrok:
image: ngrok/ngrok:latest
command: http server:3000 --authtoken ${NGROK_AUTH} --subdomain ${NGROK_DOMAIN}
restart: unless-stopped
ports:
- "4040:4040"
depends_on:
- server
NGROK_AUTH
: Your ngrok authentication token.NGROK_DOMAIN
: Your desired subdomain for the ngrok tunnel.
- Ensure
NGROK_AUTH
andNGROK_DOMAIN
are set in your environment. - Run
./start.sh /path/to/project
to start the services, including ngrok.
The ngrok tunnel will forward traffic to the server
service running on port 3000 and expose the ngrok web interface on port 4040.