mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-06 01:14:36 +08:00
63 lines
1.6 KiB
Plaintext
63 lines
1.6 KiB
Plaintext
---
|
|
title: Docker Deployment
|
|
description: Deploy Infinite Canvas with Docker Compose
|
|
---
|
|
|
|
# Docker Deployment
|
|
|
|
## Use the published image
|
|
|
|
```bash
|
|
git clone git@github.com:basketikun/infinite-canvas.git
|
|
cd infinite-canvas
|
|
docker compose up -d
|
|
```
|
|
|
|
Open `http://localhost:3000`.
|
|
|
|
## Build locally
|
|
|
|
```bash
|
|
docker compose -f docker-compose.local.yml up -d --build
|
|
```
|
|
|
|
## Documentation image
|
|
|
|
The documentation in `docs/` is a separate Next.js standalone application with server capabilities.
|
|
|
|
```bash
|
|
cd docs
|
|
docker compose up -d
|
|
```
|
|
|
|
To build it from the current source:
|
|
|
|
```bash
|
|
cd docs
|
|
docker compose -f docker-compose.local.yml up -d --build
|
|
```
|
|
|
|
The main application container only runs Next.js. Canvases, My Assets, generation history, and API keys are stored in the browser by default, while prompt repositories are fetched directly by the frontend. No persistent data volume is required for this data.
|
|
|
|
## Optional analytics
|
|
|
|
No analytics are enabled by default. A deployment can enable GA4, Baidu Analytics, or both at runtime:
|
|
|
|
| Variable | Description |
|
|
| --- | --- |
|
|
| `ANALYTICS_GA4_ID` | Google Analytics 4 measurement ID (`G-XXXX`) |
|
|
| `ANALYTICS_BAIDU_ID` | Baidu site ID, the hash after `hm.js?` |
|
|
|
|
```yaml
|
|
services:
|
|
app:
|
|
image: ghcr.io/basketikun/infinite-canvas:latest
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
ANALYTICS_GA4_ID: G-XXXXXXXXXX
|
|
ANALYTICS_BAIDU_ID: e8263761cc5c32f5f7a855b8203b965a
|
|
```
|
|
|
|
SPA route changes automatically report page views to enabled providers. Only configure analytics IDs on sites you control, and do not commit them to the repository.
|