forked from prebid/salesagent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.fly
More file actions
55 lines (41 loc) · 1.34 KB
/
Dockerfile.fly
File metadata and controls
55 lines (41 loc) · 1.34 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
# Fly.io Dockerfile for AdCP Sales Agent with A2A Server
# syntax=docker/dockerfile:1.4
# Use AWS Public ECR to avoid Docker Hub rate limits
# Public ECR mirrors official Docker images without rate limiting
FROM public.ecr.aws/docker/library/python:3.12-slim
# Install dependencies including nginx
RUN apt-get update && apt-get install -y \
libpq5 \
curl \
gcc \
libpq-dev \
nginx \
&& rm -rf /var/lib/apt/lists/*
# Install Python packages
RUN pip install uv
WORKDIR /app
# Copy and install dependencies
COPY pyproject.toml uv.lock ./
RUN uv sync
# Copy application
COPY . .
# Copy nginx configuration
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
# Add .venv to PATH
ENV PATH="/app/.venv/bin:$PATH"
ENV PYTHONUNBUFFERED=1
# Service ports
ENV ADCP_SALES_PORT=8080
ENV ADMIN_UI_PORT=8001
ENV A2A_PORT=8091
# Disable mock mode in production (enables proper URL configuration)
ENV A2A_MOCK_MODE=false
# Make scripts executable
RUN chmod +x scripts/deploy/run_all_services.py scripts/deploy/entrypoint.sh
# Health check for nginx proxy
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Expose only the unified nginx port
EXPOSE 8000
# Run all services via entrypoint which handles migrations
ENTRYPOINT ["/bin/bash", "scripts/deploy/entrypoint.sh"]