mirror of
https://git.oceanpay.cc/danial/kami_apple_exchage.git
synced 2025-12-18 22:29:09 +00:00
- Create README.md for deployment instructions including environment requirements and setup steps. - Implement deploy.sh script for automated deployment of development and production environments. - Add combined Docker Compose configuration for frontend and backend services. - Include Redis configuration file for optimized memory management and persistence. - Update frontend Dockerfile to handle Next.js asset paths and static files. - Remove obsolete deployment files and configurations from frontend directory.
39 lines
1021 B
Docker
39 lines
1021 B
Docker
FROM python:3.13-slim
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
UV_COMPILE_BYTECODE=1 \
|
|
PATH="/app/.venv/bin:$PATH" \
|
|
UV_LINK_MODE=copy \
|
|
TZ=Asia/Shanghai \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
COPY --chmod=755 docker-entrypoint.sh ./
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
uv sync --frozen --no-install-project && \
|
|
chmod -R 755 /app/.venv/bin/*
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc g++ curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p /app/screenshots /app/logs /app/data
|
|
|
|
COPY app ./app
|
|
COPY run.py ./
|
|
COPY .env.production .env
|
|
|
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8000/api/v1/health/liveness || exit 1
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"] |