| |
| FROM nikolaik/python-nodejs:python3.9-nodejs20-slim as static |
|
|
| WORKDIR /app |
|
|
|
|
| RUN apt update &&\ |
| apt install -y wget |
|
|
| COPY init.sh init.sh |
|
|
| RUN chmod u+x init.sh && ./init.sh |
|
|
|
|
| FROM nikolaik/python-nodejs:python3.9-nodejs20-slim |
|
|
| USER root |
|
|
| |
| RUN apt update &&\ |
| apt install -y git chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends &&\ |
| apt clean && rm -rf /var/lib/apt/lists/* |
|
|
| |
| ENV CHROME_BIN="/usr/bin/chromium" \ |
| PUPPETEER_CONFIG="/app/config/puppeteer-config.json"\ |
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" |
|
|
| RUN npm install -g @mermaid-js/mermaid-cli &&\ |
| npm cache clean --force |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt requirements.txt |
|
|
| RUN pip install --no-cache-dir -r requirements.txt && \ |
| mkdir -p /app/logs && chmod 777 /app/logs && \ |
| mkdir -p /app/workspace && chmod 777 /app/workspace && \ |
| mkdir -p /app/storage && chmod 777 /app/storage |
|
|
| COPY . . |
| COPY --from=static /app/static /app/static |
| COPY config/template.yaml static/config.yaml |
|
|
| CMD ["python", "app.py"] |
|
|