Skip to content

Commit c199dc9

Browse files
committed
Merge remote-tracking branch 'origin/main' into DIAL-32-ui-chat-bot
2 parents 57efdec + cafc1b9 commit c199dc9

31 files changed

+19713
-19832
lines changed

server/.eslintrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@
2424
"@typescript-eslint/no-misused-promises": "off",
2525
"@typescript-eslint/no-unnecessary-condition": "off"
2626
},
27-
"ignorePatterns": [
28-
"drizzle.config.ts"
29-
]
30-
}
27+
"ignorePatterns": ["drizzle.config.ts"]
28+
}

server/.typesafe-i18n.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"adapter": "node",
3-
"$schema": "https://unpkg.com/[email protected]/schema/typesafe-i18n.json"
4-
}
2+
"adapter": "node",
3+
"$schema": "https://unpkg.com/[email protected]/schema/typesafe-i18n.json"
4+
}

server/.vscode/launch.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"type": "node",
6-
"request": "attach",
7-
"name": "Node: Nodemon",
8-
"processId": "${command:PickProcess}",
9-
"restart": true,
10-
"protocol": "inspector"
11-
}
12-
]
13-
}
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "attach",
7+
"name": "Node: Nodemon",
8+
"processId": "${command:PickProcess}",
9+
"restart": true,
10+
"protocol": "inspector"
11+
}
12+
]
13+
}

server/.vscode/settings.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": "always",
4-
"source.organizeImports": "always"
5-
},
6-
"editor.formatOnSave": true,
7-
"editor.defaultFormatter": "esbenp.prettier-vscode",
8-
"editor.formatOnSaveMode": "file",
9-
"[typescript]": {
10-
"editor.defaultFormatter": "vscode.typescript-language-features"
11-
}
12-
}
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": "always",
4+
"source.organizeImports": "always"
5+
},
6+
"editor.formatOnSave": true,
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"editor.formatOnSaveMode": "file",
9+
"[typescript]": {
10+
"editor.defaultFormatter": "vscode.typescript-language-features"
11+
}
12+
}

server/docker-compose.yml

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,48 @@
11
version: '3.8'
22

33
services:
4-
db:
5-
container_name: dialogue-bot-db
6-
image: postgres:latest
7-
ports:
8-
- '5432:5432'
9-
environment:
10-
POSTGRES_PASSWORD: 'postgres'
11-
POSTGRES_DB: 'dialoguebot'
12-
volumes:
13-
[
14-
{
15-
type: 'volume',
16-
source: 'bot_db',
17-
target: '/var/lib/postgresql/data',
18-
},
19-
]
20-
restart: 'unless-stopped'
21-
networks:
22-
- backend
4+
db:
5+
container_name: dialogue-bot-db
6+
image: postgres:latest
7+
ports:
8+
- '5432:5432'
9+
environment:
10+
POSTGRES_PASSWORD: 'postgres'
11+
POSTGRES_DB: 'dialoguebot'
12+
volumes:
13+
[{ type: 'volume', source: 'bot_db', target: '/var/lib/postgresql/data' }]
14+
restart: 'unless-stopped'
15+
networks:
16+
- backend
2317

24-
pgadmin:
25-
container_name: pgadmin
26-
image: dpage/pgadmin4
27-
ports:
28-
- '5050:80'
29-
environment:
30-
PGADMIN_DEFAULT_EMAIL: '[email protected]'
31-
PGADMIN_DEFAULT_PASSWORD: 'admin'
32-
restart: 'unless-stopped'
33-
networks:
34-
- backend
35-
volumes:
36-
[{ type: 'volume', source: 'pgadmin', target: '/var/lib/pgadmin' }]
18+
pgadmin:
19+
container_name: pgadmin
20+
image: dpage/pgadmin4
21+
ports:
22+
- '5050:80'
23+
environment:
24+
PGADMIN_DEFAULT_EMAIL: '[email protected]'
25+
PGADMIN_DEFAULT_PASSWORD: 'admin'
26+
restart: 'unless-stopped'
27+
networks:
28+
- backend
29+
volumes: [{ type: 'volume', source: 'pgadmin', target: '/var/lib/pgadmin' }]
3730

38-
redis:
39-
container_name: redis
40-
image: redis:alpine
41-
ports:
42-
- '6379:6379'
43-
restart: 'unless-stopped'
44-
networks:
45-
- backend
46-
volumes: [{ type: 'volume', source: 'redis', target: '/data' }]
31+
redis:
32+
container_name: redis
33+
image: redis:alpine
34+
ports:
35+
- '6379:6379'
36+
restart: 'unless-stopped'
37+
networks:
38+
- backend
39+
volumes: [{ type: 'volume', source: 'redis', target: '/data' }]
4740

4841
networks:
49-
backend:
50-
driver: bridge
42+
backend:
43+
driver: bridge
5144

5245
volumes:
53-
bot_db:
54-
pgadmin:
55-
redis:
46+
bot_db:
47+
pgadmin:
48+
redis:

server/drizzle.config.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { config } from 'dotenv';
2-
import type { Config } from 'drizzle-kit';
1+
import { config } from 'dotenv'
2+
import type { Config } from 'drizzle-kit'
33

4-
config({ path: `.env.${process.env.NODE_ENV || 'development'}.local` });
4+
config({ path: `.env.${process.env.NODE_ENV || 'development'}.local` })
55

66
export default {
7-
schema: './src/database/schema.ts',
8-
out: './src/database/migrations',
9-
driver: 'pg',
10-
dbCredentials: {
11-
connectionString: process.env.DATABASE_URL as string,
12-
},
13-
} satisfies Config;
7+
schema: './src/database/schema.ts',
8+
out: './src/database/migrations',
9+
driver: 'pg',
10+
dbCredentials: {
11+
connectionString: process.env.DATABASE_URL as string,
12+
},
13+
} satisfies Config

server/ecosystem.config.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* production mode :: pm2 start ecosystem.config.js --only prod
55
* development mode :: pm2 start ecosystem.config.js --only dev
66
*/
7-
module.exports = {
7+
module.exports = {
88
apps: [
99
{
1010
name: 'prod', // pm2 start App name
@@ -19,7 +19,8 @@
1919
merge_logs: true, // if true, stdout and stderr will be merged and sent to pm2 log
2020
output: './logs/access.log', // pm2 log file
2121
error: './logs/error.log', // pm2 error log file
22-
env: { // environment variable
22+
env: {
23+
// environment variable
2324
PORT: 3000,
2425
NODE_ENV: 'production',
2526
},
@@ -38,7 +39,8 @@
3839
merge_logs: true, // if true, stdout and stderr will be merged and sent to pm2 log
3940
output: './logs/access.log', // pm2 log file
4041
error: './logs/error.log', // pm2 error log file
41-
env: { // environment variable
42+
env: {
43+
// environment variable
4244
PORT: 3000,
4345
NODE_ENV: 'development',
4446
},
@@ -51,7 +53,8 @@
5153
ref: 'origin/master',
5254
repo: '[email protected]:repo.git',
5355
path: 'dist/server.js',
54-
'post-deploy': 'npm install && npm run build && pm2 reload ecosystem.config.js --only prod',
56+
'post-deploy':
57+
'npm install && npm run build && pm2 reload ecosystem.config.js --only prod',
5558
},
5659
},
57-
};
60+
}

server/jest.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { pathsToModuleNameMapper } = require('ts-jest');
2-
const { compilerOptions } = require('./tsconfig.json');
1+
const { pathsToModuleNameMapper } = require('ts-jest')
2+
const { compilerOptions } = require('./tsconfig.json')
33

44
module.exports = {
55
preset: 'ts-jest',
@@ -8,5 +8,7 @@ module.exports = {
88
transform: {
99
'^.+\\.tsx?$': 'ts-jest',
1010
},
11-
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/src' }),
12-
};
11+
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
12+
prefix: '<rootDir>/src',
13+
}),
14+
}

server/nodemon.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"watch": ["src", ".env.development.local"],
3-
"ext": "js,ts,json",
4-
"ignore": ["src/logs/*", "src/**/*.{spec,test}.ts"],
5-
"exec": "ts-node -r tsconfig-paths/register --transpile-only src/server.ts"
2+
"watch": ["src", ".env.development.local"],
3+
"ext": "js,ts,json",
4+
"ignore": ["src/logs/*", "src/**/*.{spec,test}.ts"],
5+
"exec": "ts-node -r tsconfig-paths/register --transpile-only src/server.ts"
66
}

0 commit comments

Comments
 (0)