Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 20c737f

Browse files
updates to work via internalip:port
1 parent 3d6b77d commit 20c737f

File tree

6 files changed

+7
-214
lines changed

6 files changed

+7
-214
lines changed

‎certs/server.crt‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎certs/server.key‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎docker-compose.yml‎

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,12 @@
1-
version: '3.8'
2-
31
services:
4-
ollama:
5-
image: ollama/ollama:latest
6-
container_name: ollama
7-
volumes:
8-
- ollama_data:/root/.ollama
9-
ports:
10-
- "11434:11434"
11-
122
api:
3+
# image: gitmotion/ollama-api-server:latest
134
build: .
145
container_name: ollama-api
6+
ports:
7+
- "${PORT_EXTERNAL:-7777}:7777"
158
environment:
169
- PORT=7777
17-
- OLLAMA_BASE_URL=http://ollama:11434
10+
- OLLAMA_BASE_URL=http://127.0.0.1:11434
1811
- CORS_ORIGIN=*
19-
- API_KEYS=${API_KEYS:-default-key-1,default-key-2}
20-
depends_on:
21-
- ollama
22-
23-
nginx:
24-
image: nginx:alpine
25-
container_name: nginx-proxy
26-
ports:
27-
- "80:80"
28-
- "443:443"
29-
volumes:
30-
- ./nginx.conf:/etc/nginx/nginx.conf:ro
31-
- ./certs:/etc/nginx/certs:ro
32-
depends_on:
33-
- api
34-
35-
volumes:
36-
ollama_data:
12+
- API_KEYS=${API_KEYS:-default-key-1,default-key-2}

‎nginx.conf‎

Lines changed: 0 additions & 133 deletions
This file was deleted.

‎src/app.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ app.get('/health', (req, res) => {
4242
res.json({ status: 'ok' });
4343
});
4444

45-
app.listen(config.port, () => {
45+
app.listen(config.port, '0.0.0.0',() => {
4646
console.log(`Server running on port ${config.port}`);
4747
});

‎src/config/environment.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const config = {
2-
port: process.env.PORT || 7777,
2+
port: Number(process.env.PORT) || 7777,
33
ollamaBaseUrl: process.env.OLLAMA_BASE_URL || 'http://localhost:11434',
44
corsOrigin: process.env.CORS_ORIGIN || '*',
55
apiKeys: (process.env.API_KEYS || '').split(',').filter(key => key.length > 0)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /