Description of what this project is here for.
All possible ENV vars can be found at ./.env.example
.
Copy this file to .env by running the following command.
cp ./.env.example ./.env
Modify this file as required and run the app using the commands found in Building
If you have lost your Pipfile, you may need to restore one from the lock. Ensure the Pipfile is not in the base dir and run the following to extract.
./build_scripts/local/extract_pipfile.sh
You need jq installed on your machine to run this successfully.
Building and testing locally is always encouraged before submitting a pull request, to ensure that tests pass and there are no issues with linting and style.
These commands assumes there is no other docker activity on the build server. For example, the run command assumes the most recently built image is the one you want to run.
Ensure the current environment is cleared on docker to get rid of dead containers, claenup dangling images and remove test reports.
./build_scripts/local/clean.sh
Build the django app image.
./build_scripts/local/build.sh
Run the app.
./build_scripts/local/run.sh
Print the logs to sdout
./build_scripts/local/logs.sh
Stop the app.
./build_scripts/local/stop.sh
Builds on this project are executed from AWS. Environment that deviates from the defaults is stored in the SSM and retrieved at runtime.
The ./build_scripts/remote/
directory contains the scripts used for remotely building, pushing and running tests when used in AWS.
The ./build_config/remote/
directory contains the config for each container used in the application.
Test the images locally by running the following commands. You may need to specify where you are running the app in order for the functional tests to find the app and run its tests.
Unit test the apps.
./build_scripts/local/unit_test.sh
Test the app end to end with Selenium.
./build_scripts/local/func_test.sh
There is functionality to retrieve the DB from AWS and copy it locally.
./build_scripts/local/get_db.sh
Haven't thought that far ahead. Open an issue on Github with any questions. Run the pre commit script to validate your code before opening a pull request.
./build_scripts/local/pre_commit.sh