-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate scripts to tools/scripts #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9c04673
e33db1c
2dd06d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Git | ||
| .git | ||
| .gitignore | ||
|
|
||
| # Python | ||
| __pycache__ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
| .venv | ||
| venv/ | ||
| ENV/ | ||
| env/ | ||
| .eggs | ||
| *.egg-info/ | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
| htmlcov/ | ||
| .coverage | ||
| coverage.xml | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # Build artifacts | ||
| build/ | ||
| dist/ | ||
| *.egg | ||
|
|
||
| # Documentation | ||
| docs/ | ||
| *.md | ||
| !README.md | ||
|
|
||
| # Tests (not needed in production image) | ||
| tests/ | ||
| pytest.ini | ||
|
|
||
| # Development files | ||
| .pre-commit-config.yaml | ||
| Makefile | ||
| docker-compose*.yml | ||
|
|
||
| # Templates (not needed in production) | ||
| templates/ | ||
|
|
||
| # Tools (not needed in production) | ||
| tools/ | ||
|
|
||
| # Node modules (if any) | ||
| node_modules/ | ||
|
|
||
| # Misc | ||
| .DS_Store | ||
| *.log | ||
| *.tmp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # CodeFlow Engine Docker Image | ||
| # Multi-stage build for optimized production image | ||
|
|
||
| # Stage 1: Build stage | ||
| FROM python:3.12-slim as builder | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install build dependencies | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| curl \ | ||
| git \ | ||
| libpq-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install poetry | ||
| RUN pip install --no-cache-dir poetry==1.8.3 | ||
|
|
||
| # Copy dependency files | ||
| COPY pyproject.toml poetry.lock ./ | ||
|
|
||
| # Configure poetry to not create virtual environment (we're in a container) | ||
| RUN poetry config virtualenvs.create false | ||
|
|
||
| # Install dependencies (without dev dependencies by default) | ||
| ARG RUN_TESTS=false | ||
| RUN if [ "$RUN_TESTS" = "true" ]; then \ | ||
| poetry install --no-interaction --no-ansi; \ | ||
| else \ | ||
| poetry install --no-interaction --no-ansi --only main,server,database,resilience; \ | ||
| fi | ||
|
Comment on lines
+26
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify Poetry dependency groups in pyproject.toml
if [ -f "pyproject.toml" ]; then
echo "=== Checking for Poetry dependency groups ==="
# Look for all [tool.poetry.group.*] sections
echo "Group sections found:"
rg -n '^\[tool\.poetry\.group\.' pyproject.toml
# Also check for dependencies section
echo -e "\n[tool.poetry] dependencies section:"
rg -n '^\[tool\.poetry\.dependencies\]' pyproject.toml
# Extract the actual group names defined
echo -e "\n=== Extracting defined group names ==="
rg '^\[tool\.poetry\.group\.(\w+)' -o -r '$1' pyproject.toml | sort -u
else
echo "ERROR: pyproject.toml not found in repository"
fiRepository: JustAGhosT/codeflow-engine Length of output: 660 Fix undefined Poetry group "main" in dependency installation. The 🤖 Prompt for AI Agents |
||
|
|
||
| # Stage 2: Production stage | ||
| FROM python:3.12-slim as production | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install runtime dependencies only | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| libpq5 \ | ||
| curl \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && useradd --create-home --shell /bin/bash codeflow | ||
|
|
||
| # Copy installed packages from builder | ||
| COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
| COPY --from=builder /usr/local/bin /usr/local/bin | ||
|
|
||
| # Copy application code | ||
| COPY codeflow_engine/ ./codeflow_engine/ | ||
| COPY pyproject.toml ./ | ||
| COPY alembic/ ./alembic/ | ||
|
|
||
| # Set ownership to non-root user | ||
| RUN chown -R codeflow:codeflow /app | ||
|
|
||
| # Switch to non-root user | ||
| USER codeflow | ||
|
|
||
| # Environment variables | ||
| ENV PYTHONUNBUFFERED=1 \ | ||
| PYTHONDONTWRITEBYTECODE=1 \ | ||
| HOST=0.0.0.0 \ | ||
| PORT=8080 | ||
|
|
||
| # Expose the application port | ||
| EXPOSE 8080 | ||
|
|
||
| # Health check | ||
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | ||
| CMD curl -f http://localhost:8080/health || exit 1 | ||
|
|
||
| # Default command: run the server | ||
| CMD ["python", "-m", "codeflow_engine.server"] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Poetry package manager latest stable version 2025 Poetry 1.8.3 known issues💡 Result:
Short answer
Known issues with Poetry 1.8.3
If you want, I can link specific issue threads or show the exact error texts and suggested workarounds.
Sources
Citations:
Upgrade Poetry to version 2.2.1 or latest 2.x release.
Poetry 1.8.3 is outdated and has known issues: it fails to handle wheel packages using metadata format 2.4, has version-solving/constraint resolution bugs, and is affected by disclosed vulnerabilities. The latest stable version is 2.2.1 (released September 2025). Upgrade the Dockerfile to use Poetry 2.2.1 or a newer 2.x release.
🤖 Prompt for AI Agents