Skip to content

Start adding infrastructure for building a container in CI - #24

Merged
tomneep merged 7 commits into
CLIMB-TRE:mainfrom
tomneep:docker-building
Mar 10, 2026
Merged

tomneep merged 7 commits into
CLIMB-TRE:mainfrom
tomneep:docker-building

Conversation

@tomneep

@tomneep tomneep commented Mar 3, 2026 •

Copy link
Copy Markdown
Collaborator

The goal here is to be able to build an agate container (in CI). It should just include agate and be configurable (enough) so that we can run the container with the right settings.

This is WIP while I work out exactly how we are going to get this deployed and I expect there will be some iterating.

Details

This is the contents of the container that gets created.

❯ podman run --rm -it --entrypoint /bin/sh agate -c 'ls -R'
.:
README.md  account  agate  core  empty_message_retrieval.py  entrypoint.sh  manage.py  requirements.txt  varys_message_retrieval.py

./account:
__init__.py  admin.py  apps.py	migrations  models.py

./account/migrations:
0001_initial.py  __init__.py

./agate:
__init__.py  apps.py	       caching.py		      migrations  pagination.py  scheduled_tasks.py  templates	urls.py
admin.py     authorisation.py  message_retrieval_protocol.py  models.py   queue_reading  serializers.py      tests	views.py

./agate/migrations:
0001_initial.py  __init__.py

./agate/queue_reading:
__init__.py  ingestion_updater.py  queue_reader.py  tracking_models.py

./agate/templates:
general

./agate/templates/general:
landing_page.html

./agate/tests:
__init__.py  test01.py	test_api_endpoints.py  test_authorisation.py  test_ingestion_updater.py  test_queue_reading.py

./core:
__init__.py  local_settings.example.py	local_settings.py  local_settings.test.py  production.py  settings.py  static  templates  templatetags	urls.py  wsgi.py

./core/static:
css

./core/static/css:
style.css

./core/templates:
400.html  403.html  404.html  500.html	base.html

./core/templatetags:
__init__.py  settings_value.py

tomneep added 5 commits March 3, 2026 13:35
The goal here is to be able to build an `agate` container.
It should just include `agate` and be configurable (enough) so that
we can run the container with the right settings.
@tomneep

tomneep commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @warrickball, this is in draft but it might be worth you having a scan through to see if you've any thoughts about this.
This is in the context of running agate on Kubernetes, to do that we need an image somewhere we can pull. This PR should be adding what we require in a minimal agate image.

Standalone it isn't very useful but I'm hopeful I might be able to get it to work with a local Kubernetes setup.

@tomneep
tomneep marked this pull request as ready for review March 4, 2026 15:28
Comment thread agate/.dockerignore Resolved
Comment thread agate/core/production.py Resolved
@warrickball

warrickball commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

Source looks fine (bearing in mind my limited Django experience) and I've just commented on a few details. I've built the container easily with Podman myself and reproduced your example in the PR description. I haven't fully run it (I stopped short of creating a Postgres database) but it looks good to me so far. Let me know if there's anything in particular I should run in order to test more thoroughly.

@tomneep

tomneep commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @warrickball, thanks for looking at this. I'm not sure there is much more to test at the moment here. If we can get this merged into main (and #25) then I think the next thing would be to add the CI to build and push the image to ghcr. Let me know if you have any more comments on this particular PR.

@warrickball
warrickball self-requested a review March 10, 2026 16:46
@tomneep
tomneep merged commit 6e5da0c into CLIMB-TRE:main Mar 10, 2026
3 checks passed
@tomneep
tomneep deleted the docker-building branch March 23, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants