Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 1.05 KB

README.md

File metadata and controls

68 lines (52 loc) · 1.05 KB

akash-api-demo

Demo using Akash API

Environment Variables

1. Backend

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

2. Frontend

Build frontend:

cd frontend
docker build -t frontend .

Run frontend:

docker run -d -p 3000:3000 --name frontend frontend

3. Running Both

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

Accessing the Application