fxa/_dev
Barry Chen a0f1ebe043
chore(build): switch to python3 in builder docker deps
2022-05-18 16:34:39 -05:00
..
docker chore(build): switch to python3 in builder docker deps 2022-05-18 16:34:39 -05:00
firebase feat(dev): add firebase emulator ui visit http://localhost:9299 2021-10-15 16:48:06 -07:00
goaws feat(event-broker): wire up events from auth-server through event-broker to webhooks in local dev 2021-12-15 16:00:50 -08:00
pm2 chore(dev): wait for containers on 'yarn start' (#11119) 2021-11-22 16:58:30 -08:00
.eslintrc refactor(auth): use direct db connection for reads 2021-04-06 10:29:49 -07:00
.prettierrc chore(format): mass reformat with prettier 2 and single config 2020-05-24 10:51:57 -07:00
.stylelintrc feat(fxa-auth-server): Setup CSS solution for emails 2021-07-16 21:38:25 +05:30
README.md Add documentation for docker build-time environment variables 2021-01-08 11:06:01 +01:00
tsconfig.base.json chore(deps): update typescript to 4.5.2 2021-11-18 23:25:28 -08:00
tsconfig.browser.json fix(edge): fxa failed on Edge 2020-07-29 17:53:56 -07:00
tsconfig.node.json refactor(tsconfig): consolidate common tsconfig options 2020-05-26 12:18:51 -07:00

README.md

_dev

This directory contains files to support local development that aren't needed in production, especially things that would otherwise clutter up the root directory.

Build-Time Environment Variables (Docker)

By default, only environment variables explicitly declared inside the respective Dockerfile are visible during the build process of a Docker image. However, it is sometimes needed to customize how certain tools do their job within that process. For this reason, the developer can opt to provide additional environment variables using a Shell file at _dev/local-build-env.sh.

This file - if available (ignored by Git, so be careful with git clean -x) - will be sourced by the actual build script _scripts/base-docker.sh and thus allows to use any Shell code to also do other customizations, although it is expected to define variables only (and may use functions to generate the value).

The following is an example of such a file to set a proxy for downloading dependencies by NPM or YARN:

npm_config_http_proxy="https://npm-proxy.mycorp.localdomain:9876"
npm_config_https_proxy="${npm_config_https_proxy}"

yarn_http_proxy="${npm_config_https_proxy}"
yarn_https_proxy="${npm_config_https_proxy}"

Please note that the execution context of this script is also inside the Docker build environment, so it will be limited to the commands that the Docker base image provides or that have been installed before (see _dev/docker/builder/Dockerfile).