Merge pull request #8 from josedario87/codex/create-make-command-for-local-server-deployment
Add Make targets for local dev
This commit is contained in:
8
.env.example
Normal file
8
.env.example
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copy this file to `.env` and adjust variables as needed
|
||||
# URL of your LLM agent
|
||||
LLM_AGENT_URL=http://localhost:8000
|
||||
# URL of the WhatsApp gateway
|
||||
OPEN_WA_URL=https://whatsappbot.interno.com/
|
||||
# Optional custom ports
|
||||
PORT=3000
|
||||
ROUTER_PORT=3001
|
||||
12
Makefile
12
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: sync-from-github sync-to-github
|
||||
.PHONY: sync-from-github sync-to-github chat router
|
||||
|
||||
# Pull latest changes from the GitHub mirror and push them to Gitea
|
||||
sync-from-github:
|
||||
@@ -8,3 +8,13 @@ sync-from-github:
|
||||
# Push local changes to the GitHub mirror
|
||||
sync-to-github:
|
||||
git push github main
|
||||
|
||||
# Start the chat UI locally (uses variables from .env if present)
|
||||
chat:
|
||||
@set -a; [ -f .env ] && . .env || true; set +a; \
|
||||
cd chat-ui && npm install && npm run build && npm start
|
||||
|
||||
# Start the WhatsApp router locally (uses variables from .env if present)
|
||||
router:
|
||||
@set -a; [ -f .env ] && . .env || true; set +a; \
|
||||
cd whatsapp-router && npm install && npm run build && npm start
|
||||
|
||||
@@ -19,3 +19,12 @@ docker-compose up --build
|
||||
```
|
||||
|
||||
The chat UI will be available on [http://localhost:3000](http://localhost:3000). Open-wa exposes its API on port `8080` and the WhatsApp router listens on port `3001`.
|
||||
Alternatively you can run the chat UI and router locally using Make:
|
||||
|
||||
```bash
|
||||
make chat # start chat-ui
|
||||
make router # start whatsapp-router
|
||||
```
|
||||
|
||||
Both targets read configuration from a `.env` file if it exists (see `.env.example`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user