Create docker-compose.yml

一个 docker-compose.yml 示例:易于部署、保持更新
This commit is contained in:
hugoyue 2023-03-31 20:20:28 +08:00 committed by GitHub
parent c70c311989
commit 9352901f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
version: "3"
services:
chatgpt-next-web:
container_name: chatgpt-next-web
image: yidadaa/chatgpt-next-web:latest
ports:
- 3000:3000
environment:
- OPENAI_API_KEY=[YOUR_API_KEY_HERE]
- CODE=[YOUR_CODE_HERE]
restart: always
watchtower:
container_name: watchtower
image: containrrr/watchtower
environment:
- TZ=Asia/Shanghai
command: --schedule "0 */6 * * *" --cleanup # Detect and clean up old containers every 6 hours.
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always