appyter-catalog: A catalog of appyters
Pull requests encouraged, please refer to the example for registering your own appyter.
Currently, because this application deals with several independent appyters, we construct Dockerfiles independently for each and facilitate deployment with docker-compose.yml. In the future this can be extended to automatically generating a kubernetes deployment or simply using docker-in-docker, but for now a simple Makefile will do the trick of hosting the docker-compose on a single system.
# Download the catalog locally
git clone git@github.com:MaayanLab/appyter-catalog.git
# Build+run everything
make deploy
# Build+run specific components
make appyters/example/.deploy app/.deploy
# Publish specific component
make appyters/example/.publishThe appter-catalog does several things to permit integration of several independent appyters with their own dependencies while permitting various modifications performed at the entire application level.
- Submit pull request with new appyter added to
appytersdirectory. .github/workflows/validate_merge.ymlinstructs github to executevalidate/validate_merge.pyvalidate/validate_merge.pyexecutes, validating the structure of the directory including- Asserting that
appyter.jsonis formatted according to theschema/appyter-validator.jsonjson-schema validator - Asserting that other relevant files are present
- Uses
compose/build_dockerfile.pyto construct and build a Dockerfile the same way it would be done in production
- Asserting that
- PR is accepted if and only if the validation and manual review is passed
Makefilecan be used to facilitate the remaining steps- Run
compose/build_dockerfile.pyfor each appyter to injectoverrides,catalog_helper, and construct a Dockerfile for theappyter- When built, the files in
overridewill be merged (usingcompose/catalog_helper.py) with the appyter's ownappyteroverrides
- When built, the files in
- Run
compose/build_appyters.pyto build a unifiedappyters.jsonfile, containing information about each appyter for theapp - Run
cd app && npm i && npm run buildto build theapp(written in nodejs) with the most recently renderedappyters.json - Run
compose/build_compose.pyto build a application widedocker-compose.ymlwhich includes a unified proxy for serving all apps on one endpoint - Run
docker-compose buildto build all Dockerfiles for theappytersand theapp- Variables in
.envare automatically loaded bydocker-compose appyter_versionin.envis used as aDockerfile argpermitting easy updates to the version used by allappyters- A
postgresdatabase is used throughpostgrestforappstate.postgres/migrationscontains thepostgresschema of that database, which are applied at database initialization inpostgres/Dockerfile
- Variables in
- Run
docker-compose up -dto start all docker containers in the application.- Variables in
.envare automatically loaded bydocker-compose maayanlab/proxyis used to proxy different paths to the respective containers and set uphttpswithletsencryptpostgrestexposespostgrestables, views, and functions on theapischema with theguestrole over HTTP at/postgrestappfacilitates showing allappytersand navigating users to the mount location of the actualappytercontainer.data/<container_name>contains all application data split up by container mounted from the host.
- Variables in