-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cloud
More file actions
64 lines (52 loc) · 1.61 KB
/
Dockerfile.cloud
File metadata and controls
64 lines (52 loc) · 1.61 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
57
58
59
60
61
62
63
# Cloud Jira Optimized Dockerfile for JUNO
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY juno-agent/requirements.txt .
COPY requirements.txt ./requirements-base.txt
# Install Python dependencies with cloud optimizations
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -r requirements-base.txt && \
pip install --no-cache-dir \
aiohttp[speedups] \
uvloop \
redis[hiredis] \
psycopg2-binary \
prometheus-client
# Copy application code
COPY juno-agent/ ./juno-agent/
COPY juno-dashboard/dist/ ./static/
COPY . .
# Create necessary directories
RUN mkdir -p logs data temp
# Set environment variables for cloud optimization
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
ENV CLOUD_OPTIMIZATIONS=true
ENV ASYNC_MODE=true
ENV CACHE_BACKEND=redis
# Create non-root user for security
RUN useradd --create-home --shell /bin/bash juno && \
chown -R juno:juno /app
USER juno
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/health || exit 1
# Expose port
EXPOSE 5000
# Start command with cloud optimizations
CMD ["python", "-m", "uvicorn", "juno-agent.src.main:app", \
"--host", "0.0.0.0", \
"--port", "5000", \
"--workers", "4", \
"--loop", "uvloop", \
"--access-log", \
"--log-level", "info"]