-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (36 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
48 lines (36 loc) · 1.18 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
# Aurora Shield - INFOTHON 5.0 Docker Image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies including Docker CLI
RUN apt-get update && apt-get install -y \
curl \
docker.io \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire project
COPY . .
# Create logs directory
RUN mkdir -p /app/logs
# Expose the dashboard port (Render will override with PORT env var)
EXPOSE 8080
# Health check - uses PORT env var for Render compatibility
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${PORT:-8080}/health || exit 1
# Set environment variables
ENV PYTHONPATH=/app
ENV AURORA_ENV=docker
ENV FLASK_ENV=production
ENV PORT=8080
# Create non-root user for security and add to docker group
RUN useradd -m -u 1000 aurora && \
groupadd -f docker && \
usermod -aG docker aurora && \
chown -R aurora:aurora /app
# Don't switch to aurora user yet - stay as root for Docker access
# USER aurora
# Start the application
CMD ["python", "main.py"]