-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 854 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PLAYWRIGHT_BROWSERS_PATH=/opt/playwright
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Install Playwright's Chromium and its OS dependencies into a shared path
RUN playwright install --with-deps chromium \
&& chmod -R o+rx /opt/playwright
RUN addgroup --system app && adduser --system --ingroup app app
# Copy application
COPY artemis/ ./artemis/
# Expose port
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5)" || exit 1
USER app
# Run the application
CMD ["python", "-m", "artemis.main"]