intitial docker impl

This commit is contained in:
Game_Time
2025-08-20 15:26:14 +05:00
parent fc9727cb73
commit c8c6540d23
7 changed files with 167 additions and 4 deletions

37
docker-compose.yml Normal file
View File

@@ -0,0 +1,37 @@
version: "3.9"
services:
chatmock:
build: .
image: chatmock:latest
container_name: chatmock
command: ["serve"]
env_file: .env
environment:
- CHATGPT_LOCAL_HOME=/data
ports:
- "8000:8000"
volumes:
- chatmock_data:/data
- ./prompt.md:/app/prompt.md:ro
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/health').status==200 else 1)\" "]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
chatmock-login:
image: chatmock:latest
profiles: ["login"]
command: ["login"]
environment:
- CHATGPT_LOCAL_HOME=/data
- CHATGPT_LOCAL_LOGIN_BIND=0.0.0.0
volumes:
- chatmock_data:/data
ports:
- "1455:1455"
volumes:
chatmock_data: