forked from tashfeenahmed/freellmapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (38 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
services:
freellmapi:
image: ghcr.io/tashfeenahmed/freellmapi:latest
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
NODE_ENV: production
PORT: 3001
# Bound to localhost by default — FreeLLMAPI is single-user and must not be
# exposed to the internet. Set HOST_BIND=0.0.0.0 to reach it from your LAN.
ports:
- "${HOST_BIND:-127.0.0.1}:${PORT:-3001}:3001"
volumes:
- freellmapi-data:/app/server/data
# Makes `host.docker.internal` resolve to the host from inside the
# container. Docker Desktop provides it already; plain Docker on Linux does
# not, and without it the documented way to reach a proxy running on the
# host (PROXY_URL=http://host.docker.internal:7890) fails to resolve.
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3001/api/ping').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
volumes:
freellmapi-data: