Added woodpecker.
This commit is contained in:
parent
c7a25e2d86
commit
1525be2387
|
|
@ -0,0 +1,59 @@
|
|||
# Python artifacts
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# Virtual environments
|
||||
.env
|
||||
.venv/
|
||||
venv/
|
||||
ENV/
|
||||
env/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Build / packaging
|
||||
build/
|
||||
dist/
|
||||
*.egg-info/
|
||||
pip-wheel-metadata/
|
||||
*.whl
|
||||
|
||||
# Test / coverage
|
||||
.pytest_cache/
|
||||
.coverage
|
||||
.coverage.*
|
||||
|
||||
# IDE / editor
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Git
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
# Logs and local files
|
||||
*.log
|
||||
logs/
|
||||
*.sqlite3
|
||||
*.tmp
|
||||
*.bak
|
||||
|
||||
# Secrets and local config (keep example files)
|
||||
*.local
|
||||
secrets.yml
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Node (if present)
|
||||
node_modules/
|
||||
|
||||
# Misc
|
||||
Dockerfile.* # optional: ignore alternate Dockerfiles (keeps main Dockerfile)
|
||||
*.DS_Store
|
||||
|
||||
# Ensure important files are included
|
||||
!requirements.txt
|
||||
!README.md
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"cSpell.enabledLanguageIds": [
|
||||
"COBOL",
|
||||
"ACUCOBOL"
|
||||
],
|
||||
"workbench.colorCustomizations": {
|
||||
"editorCursor.foreground": "#ff7f50",
|
||||
"activityBarBadge.background": "#e9dbb7",
|
||||
"activityBarBadge.foreground": "#fff",
|
||||
"statusBar.background": "#ff7f50",
|
||||
"statusBar.foreground": "#000"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# Official Python runtime
|
||||
FROM python:3.10-slim
|
||||
|
||||
# Prevents Python from writing .pyc files and enables stdout/stderr unbuffered
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PORT=8000
|
||||
|
||||
# Install build dependencies required by many Python packages (e.g. psycopg2)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends gcc libpq-dev build-essential && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --upgrade pip setuptools wheel && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Create a non-root user and give ownership of the app folder
|
||||
RUN useradd --create-home appuser && chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# Default command: run Uvicorn pointing at app/main.py (adjust if your entrypoint differs)
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
steps:
|
||||
docker_build_local:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: 91.107.138.77:5000/iralex-badmin
|
||||
dockerfile: Dockerfile
|
||||
tag: latest
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
event: push
|
||||
Loading…
Reference in New Issue