freeCodeCamp/config
Oliver Eyton-Williams 5d46e2830a
feat: add Docker build (#41187)
* feat(docker): build and use client and api images

* feat: always use .env

dotenv fails without throwing if the .env file is missing and never
overwrites variables if they already exist. As such, we can use it in
build pipelines.

* fix: remove quotes from env vars

dotenv normalises quoted and unquoted strings (X=x, X='x' and
X="x") all become the same .env object {X: 'x'}. However, Docker's
env_file does not (the three cases are distinct).  As a result, we
should use unquoted strings for consistency.

* fix: provide custom warning when .env is missing

* feat(docker): include client-config

* fix(docker): remove build packages from api image

* fix(docker): run script from correct dir

* fix(docker): correct permissions and dests

* fix(docker): consolidate run steps

This is standard practice, but did not have a noticable affect on the
image size

* fix(docker): clean the npm cache

Prior to this step the image was 1.11GB uncompressed and we got a modest
saving, 1.09GB after.

* refactor(docker): regexless COPY directives

* feat(docker): use alpine

This shrinks the image down to 259MB

* fix(docker): update build scripts

* fix: correct the server Dockerfile RUNs

* DEBUG: expose mysql port for seeding

* chore: update client Dockerfile's node versions

* fix: remove executable permissions from index.js

It's not a cli, so I don't think it needs to be executable.

* chore: update node and remove stale comments

* feat: use ENTRYPOINT + CMD to allow runtime config

* fix: add CURRICULUM_LOCALE arg

* feat: allow client port configuration

* feat: allow api port to be configured

* refactor: use unique variable names for ports

* fix: add default CLIENT_PORT

* refactor: clean up
2021-04-20 19:29:31 +05:30
..
client chore(client): refactor & organise config (#40875) 2021-02-03 15:22:07 +05:30
crowdin fix: only download chinese and spanish docs (#41114) 2021-02-14 11:48:20 -08:00
i18n fix: re-revert the API decoupling (#41263) 2021-02-25 12:02:35 -08:00
analytics-settings.js feat: isolate production and staging analytics (#41648) 2021-03-30 06:45:54 -07:00
certification-settings.js fix: dry certification config (#40927) 2021-02-22 20:38:38 -08:00
cors-settings.js fix: negative sentiment → neutral language (#39522) 2020-09-07 11:04:44 +05:30
donation-settings.js chore(deps): upgrade eslint, prettier & related packages 2021-03-11 12:19:42 +05:30
env.js feat: add Docker build (#41187) 2021-04-20 19:29:31 +05:30
misc.js fix: dry certification config (#40927) 2021-02-22 20:38:38 -08:00
secrets.js fix: remove remnants of servicebot 2020-09-04 00:14:24 +05:30