improving structure
This commit is contained in:
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_API_BASE_URL=http://localhost:8000
|
||||||
|
FRONTEND_ORIGIN=http://localhost:5173
|
||||||
13
.vscode/tasks.json
vendored
13
.vscode/tasks.json
vendored
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "noop",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "echo",
|
|
||||||
"args": [
|
|
||||||
"noop"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -82,9 +82,9 @@ def normalize_text(text: str) -> str:
|
|||||||
@lru_cache(maxsize=1)
|
@lru_cache(maxsize=1)
|
||||||
def load_taxonomy() -> dict:
|
def load_taxonomy() -> dict:
|
||||||
root_dir = Path(__file__).resolve().parents[1]
|
root_dir = Path(__file__).resolve().parents[1]
|
||||||
tax_path = root_dir / "data" / "iso" / "iso-14244-tax.json"
|
tax_path = root_dir / "data" / "iso-14244-tax.json"
|
||||||
if not tax_path.exists():
|
if not tax_path.exists():
|
||||||
tax_path = Path("/data/iso/iso-14244-tax.json")
|
tax_path = Path("/data/iso-14244-tax.json")
|
||||||
with tax_path.open("r", encoding="utf-8") as handle:
|
with tax_path.open("r", encoding="utf-8") as handle:
|
||||||
return json.load(handle)
|
return json.load(handle)
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ services:
|
|||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
- ./backend:/app
|
||||||
- ./data:/app/data
|
env_file:
|
||||||
environment:
|
- ./.env
|
||||||
- FRONTEND_ORIGIN=http://localhost:5173
|
|
||||||
command: poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
command: poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
@@ -17,8 +16,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./frontend:/app
|
- ./frontend:/app
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
environment:
|
env_file:
|
||||||
- VITE_API_BASE_URL=http://localhost:8000
|
- ./.env
|
||||||
command: pnpm dev --host 0.0.0.0 --port 5173
|
command: pnpm dev --host 0.0.0.0 --port 5173
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
import path from "path";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
envDir: path.resolve(__dirname, ".."),
|
||||||
server: {
|
server: {
|
||||||
host: true,
|
host: true,
|
||||||
port: 5173,
|
port: 5173,
|
||||||
|
|||||||
Reference in New Issue
Block a user