mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-05 22:53:23 +08:00
update
This commit is contained in:
parent
4810485a01
commit
835db2eb76
@ -68,7 +68,7 @@ COPY --from=builder /usr/src/app/wheels /wheels
|
|||||||
COPY --from=builder /usr/src/app/Pipfile .
|
COPY --from=builder /usr/src/app/Pipfile .
|
||||||
RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
|
RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
RUN pip install --no-cache /wheels/*
|
RUN pip install --no-cache /wheels/*
|
||||||
RUN pipenv install --deploy
|
RUN pipenv install --deploy --ignore-pipfile --dev
|
||||||
RUN pipenv run pip install "uvicorn[standard]==0.26.0"
|
RUN pipenv run pip install "uvicorn[standard]==0.26.0"
|
||||||
|
|
||||||
# add app
|
# add app
|
||||||
|
|||||||
@ -13,6 +13,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
container_name: backend
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
command: pipenv run uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8000
|
command: pipenv run uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8000
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
1
app/frontend/.dockerignore
Normal file
1
app/frontend/.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
18
app/frontend/package-lock.json
generated
18
app/frontend/package-lock.json
generated
@ -16,6 +16,7 @@
|
|||||||
"@eslint/js": "^9.21.0",
|
"@eslint/js": "^9.21.0",
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
"@testing-library/jest-dom": "^6.6.3",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.0",
|
||||||
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.10",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
@ -1711,6 +1712,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "22.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz",
|
||||||
|
"integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~6.21.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/react": {
|
"node_modules/@types/react": {
|
||||||
"version": "19.1.0",
|
"version": "19.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.0.tgz",
|
||||||
@ -5228,6 +5239,13 @@
|
|||||||
"typescript": ">=4.8.4 <5.9.0"
|
"typescript": ">=4.8.4 <5.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "6.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||||
|
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
"@eslint/js": "^9.21.0",
|
"@eslint/js": "^9.21.0",
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
"@testing-library/jest-dom": "^6.6.3",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.0",
|
||||||
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.10",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
const BASE_DOMAIN_NAME = process.env.REACT_APP_DOMAIN_NAME || 'localhost';
|
||||||
|
|
||||||
|
|
||||||
interface Message {
|
interface Message {
|
||||||
sender: 'user' | 'bot';
|
sender: 'user' | 'bot';
|
||||||
text: string;
|
text: string;
|
||||||
@ -13,7 +16,7 @@ const App: React.FC = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
mounted.current = true;
|
mounted.current = true;
|
||||||
const ws = new WebSocket('ws://localhost:8004/ws');
|
const ws = new WebSocket(`ws://${BASE_DOMAIN_NAME}:8004/ws`);
|
||||||
setSocket(ws);
|
setSocket(ws);
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
console.log('WebSocket connection opened');
|
console.log('WebSocket connection opened');
|
||||||
|
|||||||
@ -4,9 +4,11 @@ import react from '@vitejs/plugin-react'
|
|||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
test: {
|
|
||||||
globals: true,
|
|
||||||
environment: "jsdom",
|
|
||||||
setupFiles: "./tests/setup.ts",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://vitest.dev/config/
|
||||||
|
export const test = {
|
||||||
|
globals: true,
|
||||||
|
environment: "jsdom",
|
||||||
|
setupFiles: "./tests/setup.ts",
|
||||||
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user