Files
Jyotisha/Dockerfile
T
732642856 5150f0d99a v6.9.7: PyPI + Docker 工程化 — pip install + docker compose up 一键部署
feat(pypi): publish-pypi.yml workflow (tag-triggered, OIDC trusted publishing)
feat(docker): Dockerfile + docker-compose.yml (API :5200 + Web :5300)
feat(ci): docker-publish.yml workflow (ghcr.io, tag-triggered)
chore: version unified to v6.9.6 (pyproject/__init__/SKILL/README)
chore: MANIFEST.in + scripts/__init__.py for pip install support
chore: pyproject.toml updated packages.find to include scripts/
chore: README.md status section refreshed, P0/P1 updated

Verified: wheel build + twine check PASSED, pip install + import OK
2026-06-12 18:50:39 +08:00

50 lines
1.7 KiB
Docker

# ─── Jyotish Vedic Astrology Docker Image ───
# Build: docker build -t jyotish-vedic .
# Run: docker run -p 5200:5200 jyotish-vedic
# API: http://localhost:5200/api/health
FROM python:3.11-slim
LABEL org.opencontainers.image.title="jyotish-vedic-astrology"
LABEL org.opencontainers.image.description="Vedic Astrology (Jyotish) calculation engine with AI-ready APIs"
LABEL org.opencontainers.image.source="https://github.com/732642856/yinduzhanxing"
LABEL org.opencontainers.image.licenses="MIT"
# ─── System deps ───
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# ─── Python deps ───
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# ─── Application ───
COPY jyotish_vedic/ ./jyotish_vedic/
COPY scripts/ ./scripts/
COPY jyotish-app/ ./jyotish-app/
COPY mcp_server.py ./mcp_server.py
COPY assets/ ./assets/
# ─── Verify installation ───
RUN python -c "from jyotish_vedic import __version__; print(f'Jyotish v{__version__} ready')"
# ─── Ports ───
# 5200: REST API server
# 5300: jyotish-app static web frontend
EXPOSE 5200 5300
# ─── Health check ───
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:5200/api/health || exit 1
# ─── Entry point: start both API + web frontend ───
CMD ["sh", "-c", "\
echo 'Starting Jyotish API server on :5200...' && \
python3 scripts/jyotish_api_server.py --port 5200 & \
echo 'Starting jyotish-app on :5300...' && \
cd jyotish-app && python3 -m http.server 5300 --bind 0.0.0.0 & \
wait"]