-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (45 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
56 lines (45 loc) · 1.15 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Generated by Antigravity
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
# Install system dependencies for Playwright/Chromium and Timezone support
RUN apt-get update && apt-get install -y --no-install-recommends \
tzdata \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
&& rm -rf /var/lib/apt/lists/*
# Set default timezone
ENV TZ=Asia/Singapore
WORKDIR /app
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1
# Copy project files
COPY pyproject.toml uv.lock ./
# Install dependencies
RUN uv sync --frozen --no-install-project --no-dev
# Copy application code
COPY . .
# Install the project and Playwright browsers
RUN uv sync --frozen --no-dev && \
uv run playwright install chromium --with-deps
# Expose the port
EXPOSE 5000
# Run the application
# Copy watchdog and start script
COPY uptime_monitor.py start.sh ./
RUN chmod +x start.sh
# Run the application via start script
CMD ["./start.sh"]