Skip to content

Commit 9c731a5

Browse files
authored
Add files via upload
1 parent daab358 commit 9c731a5

2 files changed

Lines changed: 37 additions & 20 deletions

File tree

control/Dockerfile

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
FROM python:3.11-slim AS base
2-
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
3-
4-
RUN apt-get update && apt-get install -y --no-install-recommends \
5-
gcc g++ build-essential libblas-dev liblapack-dev libffi-dev git \
6-
&& rm -rf /var/lib/apt/lists/*
7-
1+
FROM node:20-alpine AS deps
82
WORKDIR /app
9-
COPY control/pyproject.toml ./pyproject.toml
10-
COPY control/README.md ./README.md
11-
COPY control/aionos_control ./aionos_control
12-
COPY control/app ./app
13-
14-
RUN pip install --upgrade pip setuptools wheel
15-
RUN pip install "."
3+
COPY console/package*.json ./
4+
RUN npm install
5+
COPY console/ ./
6+
# اگر پروژه Next.js/React داری بیلد را تلاش کن ولی اجباری نباشد
7+
RUN npm run build || true
168

17-
ARG AION_EXTRAS=""
18-
RUN if [ -n "$AION_EXTRAS" ]; then pip install ".[${AION_EXTRAS}]"; fi
19-
20-
COPY control/ ./
21-
EXPOSE 8080
22-
CMD ["uvicorn","aionos_control.main:app","--host","0.0.0.0","--port","8080"]
9+
FROM node:20-alpine
10+
WORKDIR /app
11+
ENV NODE_ENV=production
12+
COPY --from=deps /app ./
13+
EXPOSE 3000
14+
# اگر next هست: ["npm","run","start"] اگر dev میخوای: ["npm","run","dev"]
15+
CMD ["npm","run","start"]

control/tsconfig.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2017",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": false,
6+
"skipLibCheck": true,
7+
"strict": true,
8+
"forceConsistentCasingInFileNames": true,
9+
"noEmit": true,
10+
"module": "esnext",
11+
"moduleResolution": "node",
12+
"resolveJsonModule": true,
13+
"isolatedModules": true,
14+
"jsx": "preserve",
15+
"incremental": true,
16+
"types": ["node", "jest", "vitest/globals", "@testing-library/jest-dom"],
17+
"baseUrl": ".",
18+
"paths": {
19+
"@/*": ["./*"]
20+
}
21+
},
22+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
23+
"exclude": ["node_modules"]
24+
}

0 commit comments

Comments
 (0)