Files
AgentBlock/README.md
T
2026-06-24 22:45:34 +08:00

52 lines
1.7 KiB
Markdown

<div align="center">
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
</div>
# Run and deploy your AI Studio app
This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/b6ca5081-8525-4b56-8fbc-92c242c9ae8a
## Run Locally
**Prerequisites:** Node.js
1. Install dependencies:
`npm install`
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
`npm run dev`
## Run With Docker
**Production deployment (minimum Docker download):**
1. Create `.env.local` from `.env.example` and set `GEMINI_API_KEY`.
2. Build the static files locally with the dependencies already installed:
`npm run build`
3. Start the production container:
`docker compose up --build -d`
4. Open `http://localhost:8080`.
The production compose stack runs two services:
- `app`: nginx serves the host-built `dist` folder on `http://localhost:8080`
- `api`: the VISA API runs on `http://localhost:4000`
nginx also proxies API calls under `http://localhost:8080/api/...` to the API
container. The frontend image copies the local `dist` directory into
`nginx:stable-alpine3.23-slim`; it does not download Node or reinstall npm
packages inside the frontend Docker image.
**Development server (optional, downloads a Node image and dependencies):**
1. Create `.env.local` from `.env.example` and set `GEMINI_API_KEY`.
2. Start the development container:
`docker compose -f docker-compose.dev.yml up --build`
3. Open `http://localhost:3000`.
The development compose stack runs Vite on `http://localhost:3000` and the VISA
API on `http://localhost:4000`.