Docker setup for building a Django, RDKit and Postgres stack with neo4j.
There is no application code in this repository, it is a repository where the stack application is assembled using environment variables that define the origin of the Backend and Frontend container images.
The stack is built and orchestrated using GitHub Actions and is deployed to staging and production installations (Namespaces in a designated Kubernetes cluster).
The build variables DOCKERHUB_USERNAME and TRIGGER_AWX must be defined
for orchestration to take place. Staging deployments take place on every downstream
build (frontend and backend) and tag, and production deployments take place on every tag.
You MUST make sure the Action variables that select the backend and frontend
container images are updated prior to every production release so the stack
uses the appropriate backend and frontend code. You will find these variables
in the .github/workflows/build-main.yaml action file: -
BE_IMAGE_TAGFE_IMAGE_TAG
More information on pushing to production
A docker-compose file provides a convenient way of launching the stack locally. The suitability of the various docker-compose files is the responsibility of the developer.
Check the compose file, adjust accordingly, then: -
docker-compose up -d
Containers in the docker-compose generally store persistent data in the
./datadirectory of this repository. These directories are created automatically if they do not exist.
When you're done you can tear everything down with: -
docker-compose down
-
Create new releases for the Frontend and Backend.
- Create a new release for the frontend
- Create a new tag with the format:
YYYY.MM.#where:YYYYis the current yearMMis the current month#is the patch number (positive integer)
- Choose a target:
stagingorproduction - Title the release
- Describe the release
- Create a new tag with the format:
- Create a new release for the backend
- Same as the frontend
- Create a new release for the frontend
-
Update build-main.yaml with the new tags
- Change
FE_IMAGE_TAGto the desired Frontend tag - Change
BE_IMAGE_TAGto the desired Backend tag - Commit the changes to a new branch and start a pull request
- Wait for review and approval
- Wait for the GitHub action to complete (~10-20mins)
- Change
N.B. you can get the current Frontend, Backend, and Stack tags from the bottom of the Fragalysis menu
- Create a new release for fragalysis-stack
- Use the same tag convention as for the Frontend and Backend.
- Tags do not need to agree across the three repositories!