| |
| FROM node:18-alpine as frontend-builder |
|
|
| |
| RUN apk add --no-cache git |
|
|
| |
| RUN git clone https://github.com/lanzhihong6/stock-scanner.git /app |
|
|
| |
| WORKDIR /app/frontend |
|
|
| |
| RUN npm ci && npm run build |
|
|
| |
| FROM python:3.10-slim |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| libgl1-mesa-glx \ |
| ca-certificates \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN git clone https://github.com/lanzhihong6/stock-scanner.git /app && \ |
| chmod -R 777 /app && \ |
| chmod +x /app/web_server.py |
| |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "web_server.py"] |