intitial docker impl
This commit is contained in:
37
docker-compose.yml
Normal file
37
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user