mirror of
https://github.com/vndangkhoa/purestream.git
synced 2026-04-05 01:17:58 +07:00
Fix: Add xauth for xvfb-run, improve .dockerignore, cleanup unused files
This commit is contained in:
parent
156bc9aed6
commit
644c9916e7
2 changed files with 34 additions and 3 deletions
|
|
@ -1,15 +1,42 @@
|
||||||
|
# Dependencies
|
||||||
node_modules/
|
node_modules/
|
||||||
|
backend/venv/
|
||||||
venv/
|
venv/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
# Git
|
||||||
.git/
|
.git/
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
||||||
|
# Logs and temp
|
||||||
*.log
|
*.log
|
||||||
*.md
|
*.md
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# IDE
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
|
# Cache and session
|
||||||
cache/
|
cache/
|
||||||
|
backend/cache/
|
||||||
backend/session/
|
backend/session/
|
||||||
|
backend/downloads/
|
||||||
|
|
||||||
|
# Sensitive files
|
||||||
|
backend/cookies.json
|
||||||
|
backend/cookies_netscape.txt
|
||||||
|
backend/session_metadata.json
|
||||||
|
backend/user_agent.json
|
||||||
|
backend/.env
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Test files
|
||||||
|
backend/test_*.py
|
||||||
|
backend/debug_*.html
|
||||||
playwright-report/
|
playwright-report/
|
||||||
test-results/
|
test-results/
|
||||||
|
|
||||||
|
# Frontend build (we copy from npm build)
|
||||||
|
frontend/node_modules/
|
||||||
|
|
|
||||||
10
Dockerfile
10
Dockerfile
|
|
@ -36,6 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
libgtk-3-0 \
|
libgtk-3-0 \
|
||||||
fonts-liberation \
|
fonts-liberation \
|
||||||
xvfb \
|
xvfb \
|
||||||
|
xauth \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
@ -43,9 +44,12 @@ WORKDIR /app
|
||||||
# Copy backend requirements and install
|
# Copy backend requirements and install
|
||||||
COPY backend/requirements.txt ./
|
COPY backend/requirements.txt ./
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
# Install Playwright browsers with retries
|
||||||
# Install Playwright browsers
|
RUN mkdir -p /root/.cache/ms-playwright && \
|
||||||
RUN playwright install chromium
|
for i in 1 2 3; do \
|
||||||
|
playwright install chromium && break || \
|
||||||
|
(echo "Retry $i..." && rm -rf /root/.cache/ms-playwright/__dirlock && sleep 5); \
|
||||||
|
done
|
||||||
|
|
||||||
# Copy backend code
|
# Copy backend code
|
||||||
COPY backend/ ./backend/
|
COPY backend/ ./backend/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue