Skip to content

Commit

Permalink
Rename from gpt-proxy to chatapi && update the compose file with the …
Browse files Browse the repository at this point in the history
…env variables for chatapi && change the variable for serving to SERVE_PORT
  • Loading branch information
Mutugiii committed Jul 13, 2023
1 parent 9ad8e1e commit e1253bd
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gpt-proxy/src/index.ts → chatapi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ app.use((err: Error, req: any, res: any) => {
res.status(500).json({ 'error': 'Internal Server Error', 'message': err.message });
});

const port = process.env.PORT || 5000;
const port = process.env.SERVE_PORT || 5000;

app.listen(port, () => console.log(`Server running on port ${port}`)); // eslint-disable-line no-console
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DocumentInsertResponse } from 'nano';

import { ChatItem } from '../models/chat-item.model';
import { ChatMessage } from '../models/chat-message.model';
import { DbInitService } from '../services/db-init.service';
import { DbInitService } from './db-init.service';
import { NanoCouchService } from '../utils/nano-couchdb';

dotenv.config();
Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 11 additions & 7 deletions docker/planet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ services:
image: treehouses/couchdb:2.3.1
ports:
- "2200:5984"
db-init:
image: treehouses/planet:db-init-local
depends_on:
- couchdb
environment:
- COUCHDB_HOST=http://couchdb:5984
chat-api:
chatapi:
image: treehouses/planet:chat-api-local
depends_on:
- couchdb
ports:
- "5000:5000"
environment:
- COUCHDB_URL=http://couchdb:5984
- COUCHDB_NAME=chat_history
- SERVE_PORT=5000
env_file:
- .chat.env
db-init:
image: treehouses/planet:db-init-local
depends_on:
- couchdb
environment:
- COUCHDB_HOST=http://couchdb:5984
planet:
image: treehouses/planet:local
ports:
Expand Down

0 comments on commit e1253bd

Please sign in to comment.