Skip to content

Commit 82f1389

Browse files
authored
Modify history port (#90)
The chat service is embedded within collaboration. Let's modify history to use port 8085 instead
1 parent 952b613 commit 82f1389

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ docker compose -f compose.yml -f compose.dev.yml up -d
6262
| User Service | 8082 |
6363
| Match Service | 8083 |
6464
| Collaboration & Room Service | 8084 |
65-
| Chat Service | 8085 |
66-
| History Service | 8086 |
65+
| History Service | 8085 |
6766

6867
**Step 4: Stop the Docker containers**
6968

compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ services:
5555
history:
5656
command: npm run dev
5757
ports:
58-
- 8086:8086
58+
- 8085:8085
5959
volumes:
6060
- /app/node_modules
6161
- ./services/history:/app

nginx/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ upstream collaboration-api {
1515
}
1616

1717
upstream history-api {
18-
server history:8086;
18+
server history:8085;
1919
}
2020

2121
server {

services/history/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ DB_CLOUD_URI=<FILL-THIS-IN>
44
DB_LOCAL_URI=mongodb://history-db:27017/history
55
BROKER_URL=amqp://broker:5672
66
CORS_ORIGIN=*
7-
PORT=8086
7+
PORT=8085
88
JWT_SECRET=you-can-replace-this-with-your-own-secret
99
NODE_ENV=development

services/history/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ WORKDIR /app
44
COPY package.json package-lock.json ./
55
RUN npm install
66
COPY . .
7-
EXPOSE 8086
7+
EXPOSE 8085
88

99
CMD ["npm", "start"]

services/history/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ docker compose down -v
2727

2828
- This endpoint retrieves the history of a user.
2929
- **HTTP Method**: `GET`
30-
- **Endpoint**: http://localhost:8086/api/history/history
30+
- **Endpoint**: http://localhost:8085/api/history/history
3131
- **Headers**
3232
- `Authorization: Bearer <JWT_ACCESS_TOKEN>` (Required)
3333
- The endpoint requires the user to include a JWT (JSON Web Token) in the HTTP Request Header for authentication and authorization. This token is generated during the authentication process (i.e., login) and contains information about the user's identity. The server verifies this token to ensure that the client is authorized to access the data.

services/history/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const envSchema = z
88
NODE_ENV: z.enum(['development', 'production']).default('development'),
99
CORS_ORIGIN: z.union([z.string().url(), z.literal('*')]).default('*'),
1010
JWT_SECRET: z.string().trim().min(32),
11-
PORT: z.coerce.number().min(1024).default(8086),
11+
PORT: z.coerce.number().min(1024).default(8085),
1212
})
1313
.superRefine((data, ctx) => {
1414
const isUrl = z.string().url();

0 commit comments

Comments
 (0)