Odyssey
Build System

The Odyssey build system involves gathering dependencies and creating runtime environments for development, testing, and final delivery. It also contains tools for managing remote hosting (AWS).

Global environment variables

The build system behavior can be altered with environment variables passed to the make command. These variables can either be set via export VAR="value" prior to running make or by prefixing the build with a list of key/value pairs like so, VAR1="value" VAR2="another value" make.

Supported global environment variables:

  • VERBOSE: When 1 standard output will not be hidden and you can see all the details of the build process.

make help

Show this BUILD.md file.

make test

Perform code verification for this project. If this target returns non-zero the code base is considered broken and should not be deployed. This target will perform the following steps:

  • Build a docker image for test execution.
  • Mock DB and other external APIs.
  • Run unit tests from <project>/app/test/<subsystem>.

make test-prompt

Start a test container with a bash prompt for debugging tests.

make all or make stack

Build a full stack in the current workspace. A stack is the application web server, database server, scheduler service and all the tools required for managing Odyssey stacks and deployments.

make run or tools/bin/stack up

This target will run the stack on your default docker host. Several environment variables can be used to adjust the behavior...

Environment variables:

  • DEVMODE: When set to 1 this option instructs the build system to add a host volume mount inside the web container for direct development of web content (the app/web folder). DEVMODE=1 also adds a host volume mount at /project in both the web and db containers which maps to your projects root folder. This can be used for accessing scratch files with interactive tools such as dbprompt or webshell, etc.

    NOTE There is a Makefile shortcut for DEVMODE=1 via make dev-run

  • AUTH_RESTRICTION: Regulate the stack's authentication requirements. By default auth is disabled when running locally and is enabled for the /_restricted/... URLs in production. You can manually adjust the behavior by setting this var to these 3 values...
    • disabled: Do not require auth for any part of the application.
    • root: Require auth for the entire application.
    • unset [DEFAULT]: Require auth for URLs under /_restricted/.
  • WEB_PORT: Port to expose the application web server on. Defaults to 8000.
  • DEV_DB_PORT: (*DEVMODE only*) Port to expose the database server on. Defaults to 54321.

make db-prompt or tools/bin/dbprompt

Run a Postgres SQL prompt connected to the active DB container.

make db-shell or tools/bin/dbshell

Run a bash shell inside the container of a running DB container.

NOTE: This only works when a stack is running.

make web-shell or tools/bin/webshell

Run a bash shell inside the container of a running web container.

NOTE: This only works when a stack is running.

make clean

Clear out all docker images and containers that may have been running or cached.

make home-clean

Remove credit union directories from <ROOT>/home/...