[EPIC] AURA CLI

Improve and implement a command line interface providing targets for building, running dev and prod servers, testing and more (native and Docker).

Specification

  • Where possible, specification and documentation shall be provided before implementation: https://gitlab.servus.at/aura/meta/-/blob/master/docs/administration/cli.md
  • Not all projects have an existing run.sh script already. If it is not existing yet, create such file. If it is missing some simple targets (e.g. to start the dev or prod server) add them. Check out run.sh of Engine & Engine-Core to get an idea of an complete, but basic target set.
  • Discuss: Should parts of the script be extracted to some Makefile which is called by the run script? Does it make sense to replace the run.sh by make completely (feedback from @oyla).
  • Discuss: Does it make sense to improve the existing run.sh at all, or does it make more sense to implement a more advanced CLI (see #45) or replace it with Earthly now, to cover Makefile, Dockerfile and Bash Scripts altogether.

Best Practices for CLI development

  • Check out the Google Shell Style Guide for inspirations on writing better scripts e.g. Let's replace run.sh with run executable?
  • Keep it simple stupid (KISS) - we want to encapsulate, not re-create the complexity of lengthy docker run ... commands
  • Try to keep the glue-code and configurations D.R.Y.
  • Re-use targets as much as possible, even across projects + inside & outside of a Docker container, CI pipeline etc.

Example: Project specific Docker targets are called from the host using make docker.run, but inside the starting docker container, the CLI command is re-used in its "native version". The make run target is called from within the Dockerfile again (https://gitlab.servus.at/aura/engine/-/blob/master/Dockerfile).

TODO

  • Establish Makefile targets for dealing with repo-specific tasks
  • #59 Provide a simple META CLI for maintaining Docker & Docker Compose. Integrate with an concept for dealing with App config files and Environment variables with Docker
Edited by David Trattnig