jhpyle / docassemble

A free, open-source expert system for guided interviews and document assembly, based on Python, YAML, and Markdown.
https://docassemble.org
MIT License
775 stars 253 forks source link

Feature Request: seperate out services from Dockerfile #767

Closed emansom closed 2 weeks ago

emansom commented 5 months ago

Hello, i'd like to run docassemble as container and only docassemble to run within that container.

This'd allow me to utilize official Postgres, Redis, Celery, RabbitMQ and Apache images for all other services instead: connecting them all together through either docker-compose, Podman Pods or Kubernetes Pods.

jhpyle commented 5 months ago

All of those services can be externalized. See here for how the Kubernetes implementation does it: https://github.com/jhpyle/charts

emansom commented 5 months ago

How exactly does the docker container know to not start its own bundled services(Apache, Postgres, Redis etc.)? If I understand correctly the environment variable CONTAINERROLE=web:celery will ensure the container only runs its own web UI?

Thanks for the pointer, the documentation doesn't make it very clear there's an example.

I'd prefer if the official docassemble container kept itself very simple and instead would rely on orchestrators (like docker-compose, Kubernetes, Nomad) to launch services that it depends upon.

jhpyle commented 2 months ago

The Docker container uses supervisord and the initialize service starts other services based on the value of the CONTAINERROLE environment variable.