chore: add docker deployment support

This commit is contained in:
jerryW123
2026-06-23 14:12:30 +08:00
parent 5b4c973812
commit f51f64f3bd
10 changed files with 449 additions and 0 deletions
+22
View File
@@ -18,3 +18,25 @@ View your app in AI Studio: https://ai.studio/apps/b6ca5081-8525-4b56-8fbc-92c24
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 image copies the local `dist` directory into
`nginx:stable-alpine3.23-slim`; it does not download Node or reinstall npm
packages inside Docker.
**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`.