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/
|
||||
backend/venv/
|
||||
venv/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Git
|
||||
.git/
|
||||
.gitignore
|
||||
|
||||
# Logs and temp
|
||||
*.log
|
||||
*.md
|
||||
.DS_Store
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Cache and session
|
||||
cache/
|
||||
backend/cache/
|
||||
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/
|
||||
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 \
|
||||
fonts-liberation \
|
||||
xvfb \
|
||||
xauth \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
|
@ -43,9 +44,12 @@ WORKDIR /app
|
|||
# Copy backend requirements and install
|
||||
COPY backend/requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Install Playwright browsers
|
||||
RUN playwright install chromium
|
||||
# Install Playwright browsers with retries
|
||||
RUN mkdir -p /root/.cache/ms-playwright && \
|
||||
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/ ./backend/
|
||||
|
|
|
|||
Loading…
Reference in a new issue