Deploying a py-worker
Docker image
Section titled “Docker image”FROM aurostack.dev/wesnetech/python:3.14WORKDIR /appCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txtCOPY . .CMD ["python", "worker.py"].env is excluded from the image. Pass everything at runtime, including
HOME_PATH=/app.
Logs go to stdout (INFO and above, so docker logs shows them) and to rotating
files under $HOME_PATH/logs; mount a volume at /app/logs to keep the files.
.forgejo/workflows/build-amd-push.yml builds and pushes the image on every
push to main, tagged latest and <yy_mm_dd>_<random>, using the repository
secrets REGISTRY_URL, REGISTRY, DK_USER and DK_ACCESS_TOKEN (see
node-worker’s CI). It doesn’t check out
submodules.
Production checklist
Section titled “Production checklist”HOME_PATH=/app(or wherever the code lives),APP_ENV=production.DB_*andREDIS_*identical to the API’s production values.- Models updated to match the API’s current schema.
- Telemetry:
OPENOBSERVE_ORG,OPENOBSERVE_TOKEN, a distinctOTEL_SERVICE_NAME. - Temporal: address, namespace,
TEMPORAL_TLS_*, and thepythontask queue (or whichever queue the API starts Python workflows on).