first commit
This commit is contained in:
40
Dockerfile.local
Normal file
40
Dockerfile.local
Normal file
@@ -0,0 +1,40 @@
|
||||
# eamco_address_checker - DEVELOPMENT Dockerfile
|
||||
# Used by docker-compose.local.yml
|
||||
# Features: Hot reload via volume mount, debug logging
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONPATH=/app \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies (psycopg2 requirements)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libpq-dev \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
# Copy requirements first (for better layer caching)
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy environment file for local development
|
||||
COPY .env.local .env
|
||||
|
||||
# Copy application code (will be overridden by volume mount in compose)
|
||||
COPY app/ ./app/
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Development: Run with reload enabled
|
||||
CMD ["uvicorn", "app.main:app", "--reload", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user