24 lines
596 B
Docker
24 lines
596 B
Docker
# Använd en officiell Python-image med Playwright-stöd
|
|
FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
|
|
|
|
WORKDIR /app
|
|
|
|
# Kopiera requirements först för att utnyttja Docker-cache
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Installera webbläsaren Chromium (Playwright)
|
|
RUN playwright install chromium
|
|
|
|
# Kopiera resten av projektet
|
|
COPY . .
|
|
|
|
# Skapa tom fil för noter om den inte finns
|
|
RUN touch active_notes.txt
|
|
|
|
# Exponera Flask-porten
|
|
EXPOSE 5000
|
|
|
|
# Kör skriptet (unbuffered för att se loggar i docker logs)
|
|
CMD ["python3", "-u", "hedgeagent.py"]
|