Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (30 loc) · 4.59 KB

ENVIRONMENT.md

File metadata and controls

40 lines (30 loc) · 4.59 KB

Python-in-a-Box Environment Variables

Docker Build Args

The Dockerfile sets some modifiable parameters you can manipulate when building your container:

Variable Use Case
BUILD_ARG_ASPELL_LANGUAGE Set this value to override the language aspell will be installed to support. (defaults to 'en')
BUILD_ARG_CONTAINER_GID Set this value to override the default GID inside the container if you're having permission problems. (defaults to 1000)
BUILD_ARG_CONTAINER_UID Set this value to override the default UID inside the container if you're having permission problems. (defaults to 1000)
BUILD_ARG_PYTHON_VERSION Set this value to override the default Python version your container is built for. Useful for cross-version testing.

Default Environment Variables

The Dockerfile sets some additional default values that you can override if needed:

Variable Use Case
PIB_PROJECT_NAME Used by the CLI, set to the slug of your project name generated by cookiecutter.
PIB_DOCUMENTATION_ROOT Used by the CLI, set to the "documentation" folder by default.
PROJECT_AUTHOR Set to the author of your project, as entered into cookiecutter.
PYTHONUNBUFFERED Disables buffering in Python to ensure stdout is readily available.
VERSION_ASPELL The installed aspell version as a string.
VERSION_TRUFFLEHOG The installed TruffleHog version as a string.
VERSION_POETRY The installed Poetry version as a string.

Configurable Environment Variables

The local.env file contains all other environment content used inside the Docker container. Here's the definitive guide to these values:

Variable Use Case
GIT_HOOKS_ASPELL_LANG A language code string used by the aspell binary when spellchecking commit messages. See this hook.
GIT_HOOKS_ASPELL_ENCODING A file encoding string by the aspell binary when spellchecking commit messages. See this hook.
GIT_HOOKS_PROTECTED_BRANCHES A regex string used by this custom script to perform additional checks on matching branches.
PIB_CONFIG_FILE_LOCATION A file path string used by the pib_cli to find this configuration file, or another that you provide for customization.
PYTHONPATH A path string used by Python to find imports in your project.

Additional environment variable content your application needs can be added here for used in development, but as this file is checked in, you may want to add more environment files that you keep out of git. Modify your docker-compose.yml to reference these additional "secret" files.