Skip to content

Compositions etc to integrate all the pieces (CA, Keycload, LDAP, Database, REST API) into something cosmic

Notifications You must be signed in to change notification settings

pvarki/docker-rasenmaeher-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

RASENMAEHER integrations

"One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them."

Docker compositions, helpers etc to bring it all together into something resembling grand old ones.

WTF is RASENMAEHER anyway ?

This Disobey24 talk explains a lot.

Git submodules

When cloning for the first time use:

git clone --recurse-submodules -j8 [email protected]:pvarki/docker-rasenmaeher-integration.git

When updating or checking out branches use:

git submodule update

And if you forgot to --recurse-submodules run git submodule init to fix things.

The submodules are repos in their own right, if you plan to make changes into them change to the directory and create new branch, commit and push changes as usual under that directory.

Directories that are submodules

Autogenerated (mostly API) docs

Running in local development mode

TLDR:

alias rmdev="docker compose -p rmdev -f docker-compose-local.yml -f docker-compose-dev.yml"
rmdev build takinit
rmdev build
rmdev up

or:

alias rmlocal="docker compose -p rmlocal -f docker-compose-local.yml"
rmlocal build takinit
rmlocal build
rmlocal up

OpenLDAP and keycloak-init sometimes fail on first start, just run up again.

IMPORTANT: Only keep either rmlocal or rmdev created at one time or you may have weird network issues run "down" for one env before starting the other.

Remember to run "down -v" if you want to reset the persistent volumes, or if you have weird issues when switching between environments.

The dev version launches all the services and runs rasenmaeher-api in uvicorn reload mode so any edits you make under /api will soon be reflected in the running instance.

If rasenmaeher-ui devel server complains make sure to delete ui/node_modules -directory from host first the dockder node distribution probably is not compatible with whatever you have installed on the host.

Gaining first admin access in dev and production mode

In dev mode:

docker exec -it rmdev-rmapi-1 /bin/bash -c "source /.venv/bin/activate && rasenmaeher_api addcode"

Under dev mode, the UI runs at https://localmaeher.dev.pvarki.fi:4439.

In VM production mode:

docker exec -it rmvm-rmapi-1 /bin/bash -c "rasenmaeher_api addcode"

pre-commit notes

Use "pre-commit run --all-files" liberally (and make sure you have run "pre-commit install"). If you get complaints about missing environment variables run "source example_env.sh"

Integration tests

Pytest is used to handle the integration tests, the requirements are in tests/requirements.txt. NOTE: The tests have side-effects and expect a clean database to start with so always make sure to run "down -v" for the composition first, then bring it back up before running integration tests.

About

Compositions etc to integrate all the pieces (CA, Keycload, LDAP, Database, REST API) into something cosmic

Resources

Stars

Watchers

Forks

Packages

No packages published