gitlab-org--gitlab-foss/doc
Dmitriy Zaporozhets c08cb923ec Merge branch 'environment-variables-in-the-app' into 'master'
Environment variables in the app

Fixes #3717 and #3519 

## Why environment variables?

We need environmental variables, they are an expected way to configure apps https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c#.ntrdiyu4c

This causes many tools and to tutorials to make it easy to set environmental variables and harder to supply a configuration file. 

So even though we agree they are not ideal https://support.cloud.engineyard.com/hc/en-us/articles/205407508-Environment-Variables-and-Why-You-Shouldn-t-Use-Them the market has spoken.

## Why for GitLab the application and not for the Omnibus packages?

Environmental variables are also needed by people that do not run our Omnibus packages, for example natively bundled apps (Debian apt-get) and idiomatic Docker packages (Mesos, Kubernetes, etc.).

Of course it should work great with Omnibus packages too so any advise is welcome in that regard.

There is an MR https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/575/diffs to be able to set any variable in gitlab.rb via environmental variables. I think both that and this MR should be merged to solve the configuration problem for both Omnibus and non-Omnibus installations. When both are merged the documentation should be crosslinked.

## Why uppercase?

Need to be all cap according to Google Shell guideline:
"Constants and Environment Variable Names => All caps, separated with underscores, declared at the top of the file."
https://google.github.io/styleguide/shell.xml#Constants_and_Environment_Variable_Names

Or as explained on http://stackoverflow.com/a/673940/613240
Keeping to this convention, you can rest assured that you don't need to know every environment variable used by UNIX tools or shells in order to avoid overwriting them. If it's your variable, lowercase it. If you export it, uppercase it.

/cc @JobV @DouweM @marin @jacobvosmaer @ayufan @pravi

See merge request !2215
2015-12-28 12:44:03 +00:00
..
administration Thanks Robert for the corrections in the environment variables docs. 2015-12-28 09:37:59 +01:00
api Add API support for looking up a user by username 2015-12-24 07:57:13 -08:00
ci Fix typo on triggers docs [ci skip] 2015-12-26 13:56:33 +02:00
customization Update documentation about automatic issue closing 2015-12-07 14:11:13 +01:00
development Fix typos in all docs [skip ci] 2015-11-24 02:19:17 +03:00
gitlab-basics Merge branch 'create-issue' into 'master' 2015-10-01 16:29:29 +00:00
hooks Rewrite HTTP links to force TLS, where possible 2015-11-16 16:50:05 -08:00
incoming_email Make Reply by email easier to configure 2015-10-13 13:10:49 +02:00
install Use gitlab-workhorse 0.5.1 2015-12-17 11:55:13 +01:00
integration Add documentation for using reCAPTCHA 2015-12-27 20:38:44 -08:00
legal Rewrite HTTP links to force TLS, where possible 2015-11-16 16:50:05 -08:00
logs Revert "Merge branch 'revert-satellites' into 'master' " 2015-08-11 14:33:31 +02:00
markdown Rewrite HTTP links to force TLS, where possible 2015-11-16 16:50:05 -08:00
migrate_ci_to_ce Update ci to ce doc to make it clearer when you are done if you don't want to keep your data. 2015-10-05 16:39:58 +02:00
operations Add 'resume' capability to parallel-rsync-repos 2015-12-08 15:08:22 +01:00
permissions fixed the documentation of the Guest role in permission.md 2015-12-02 15:21:02 +01:00
profile added note about backing up recovery codes 2015-08-18 15:56:38 -07:00
project_services Change "Irc Uri" -> "IRC URI" 2015-07-07 05:48:32 -07:00
public_access Update public access documentation [ci skip] 2015-11-19 17:24:10 +02:00
raketasks [ci skip] Add user repository integrity check rake task 2015-12-14 15:27:14 -06:00
release Merge pull request #9850 from davydovanton/doc-fix-typos 2015-12-10 14:30:24 -08:00
security Clean up CRIME security doc [ci skip] 2015-12-25 15:23:06 +02:00
ssh Correction of markdown in SSH docs 2015-11-25 12:27:07 +00:00
system_hooks hooks: Add full project namespace to payload 2015-10-02 19:44:33 +02:00
update update-init-script was listed two times. removed one without explanation. 2015-12-22 05:29:19 +00:00
web_hooks Merge pull request #9850 from davydovanton/doc-fix-typos 2015-12-10 14:30:24 -08:00
workflow [ci skip] Add SVN to Git migration documentation 2015-12-15 16:29:07 -06:00
README.md Use environment variables to configure GitLab. 2015-12-27 17:36:08 +01:00

Documentation

User documentation

CI Documentation

CI Languages

CI Services

CI Examples

Administrator documentation

Contributor documentation

  • Development Explains the architecture and the guidelines for shell commands.
  • Legal Contributor license agreements.
  • Release How to make the monthly and security releases.