Repository navigation
Closed
Labels
priority: mediumMedium prioritytype: deliveryRelated to packaging, deployment etc.type: securityRelated to securityworkload: daysLikely takes days to resolve
Description
Why?
proTES is packaged with setup.py, setup.cfg, two requirements files, a hand-maintained pro_tes/version.py and a stray file named =0.12.1 (pip output). The Dockerfile runs as root, installs the app in editable mode, makes pro_tes/api world-writable and has no health check; Gunicorn trusts X-Forwarded-* headers from any address (forwarded_allow_ips = "*"). Docker Compose publishes MongoDB (no auth), RabbitMQ (guest) and Flower (no auth) on all interfaces. cloud-registry, the template for FOCA apps, has solved all of these (elixir-cloud-aai/cloud-registry#97, elixir-cloud-aai/cloud-registry#120, elixir-cloud-aai/cloud-registry#142).
How?
pyproject.tomlas in cloud-registry: setuptools-scm (version fromvX.Y.Ztags only,fallback_version),requires-python, boundeddependencies, extrasdevanddocs, package data (config.yaml,api/*.yaml), project URLs, authors "ELIXIR On-Cloud". Removesetup.py,setup.cfg,requirements.txt,requirements_dev.txt,pylintrc(moves to ruff in the style issue),pro_tes/version.pyand=0.12.1; the app reads its version from the package metadata.- Dockerfile as in cloud-registry: base image pinned by digest, dependencies installed from
pyproject.tomlbefore the code, non-editable install asroot,USER 1000, no world-writable paths,HEALTHCHECK, GunicornCMDwithpro_tes/gunicorn_config.py(noforwarded_allow_ips = "*"; documented option instead),SETUPTOOLS_SCM_PRETEND_VERSIONbuild argument, OCI labels with ELIXIR On-Cloud. - Celery worker command that works with the installed package (no
cd /app/pro_tes). - Docker Compose: pinned images, ports on
127.0.0.1, health checks (docker compose up --wait), nolinks/version, broker credentials viaCELERY_BROKER_URLfrom the environment, Flower in an opt-in profile with basic auth, aconfig.dev.yamloverlay (FOCA_CONFIG_OVERLAY) for local development. .dockerignore,.github/dependabot.yml(pip, GitHub Actions, Docker, pre-commit; FOCA minors bumped by hand) as in cloud-registry.- CI installs with
pip install -e ".[dev]"; the image build passes the version.
Acceptance criteria
-
pip install .andpython -m buildwork; the wheel contains onlypro_tesand its data; the version comes from Git tags. - The image runs as non-root and has a health check;
docker compose up --waitstarts proTES, the worker, MongoDB and RabbitMQ, with no port published beyond127.0.0.1. - The removed files are gone, and nothing refers to them.
Metadata
Metadata
Assignees
Labels
priority: mediumMedium prioritytype: deliveryRelated to packaging, deployment etc.type: securityRelated to securityworkload: daysLikely takes days to resolve
Activity
docs: build site in CI, adapt to new image
docs: switch to a MkDocs Material site (#228)