Demo using Akash API
Create a .env
file in the backend
directory with the API key from https://chatapi.akash.network/
OPENAI_API_KEY=your_api_key_here
Build backend:
cd backend
docker build -t backend .
Run backend:
docker run -d -p 5001:5001 --name backend backend
Build frontend:
cd frontend
docker build -t frontend .
Run frontend:
docker run -d -p 3000:3000 --name frontend frontend
Create a docker-compose.yml
file in your root directory:
version: '3'
services:
backend:
build:
context: ./backend
ports:
- "5001:5001"
env_file:
- ./backend/.env
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
Build and run both services:
docker-compose up --build
- Frontend: Open http://localhost:3000 in your web browser.
- Backend: The backend API will be accessible at http://localhost:5001.