File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434<details >
3535<summary ><b >docker compose 部署(点击展开)</b ></summary >
3636
37- ``` bash
38- # 下载配置文件
39- curl -O https://raw.githubusercontent.com/charyeahowo/nyaovo-random-image-api/main/docker-compose.yml
37+ 创建 ` docker-compose.yml ` ,复制以下内容,修改 ` ADMIN_PASSWORD ` 和 ` SESSION_SECRET ` :
4038
41- # 编辑 docker-compose.yml,修改 ADMIN_PASSWORD 和 SESSION_SECRET
39+ ``` yaml
40+ services :
41+ nyaovo-random-image-api :
42+ image : charyeahowo/nyaovo-random-image-api:latest
43+ container_name : nyaovo-random-image-api
44+ ports :
45+ - " 3400:3000"
46+ volumes :
47+ - ./images:/app/public/images
48+ environment :
49+ PORT : 3000
50+ PUBLIC_BASE_URL : http://localhost:3400
51+ IMAGE_ROOT : public/images
52+ CACHE_TTL_SECONDS : 60
53+ RATE_LIMIT_WINDOW_MS : 60000
54+ RATE_LIMIT_MAX : 120
55+ ADMIN_USERNAME : admin
56+ ADMIN_PASSWORD : changeme # ← 务必修改
57+ SESSION_SECRET : please-change-this # ← 务必修改
58+ ADMIN_PATH : /image/admin
59+ MAX_FILE_SIZE_MB : 10
60+ MAX_UPLOAD_FILES : 20
61+ CORS_ORIGIN : " *"
62+ restart : unless-stopped
63+ ` ` `
4264
43- # 启动
65+ ` ` ` bash
4466docker compose up -d
4567```
4668
You can’t perform that action at this time.
0 commit comments