Files
plm-backend-service/Dockerfile
admin 9829bcc47a feat: BOM模块优化 + Docker部署配置更新
## 修改内容
- BOM API优化:替代物料接口完善
- BOM模型更新:新增字段支持
- Docker配置更新:部署优化
- 初始化脚本更新
- 前端页面更新
- 部署报告新增
2026-04-03 20:06:09 +08:00

29 lines
663 B
Docker

# PLM System Backend Dockerfile
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir email-validator && \
pip install --no-cache-dir 'bcrypt<4.0'
# Copy application code
COPY app/ ./app/
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV APP_ENV=production
# Expose port
EXPOSE 8000
# Run application
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]