Go to file
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
app Merge branch 'disable-git-follow' into 'master' 2015-12-28 12:05:55 +00:00
bin Add 'resume' capability to parallel-rsync-repos 2015-12-08 15:08:22 +01:00
builds
config Merge branch 'environment-variables-in-the-app' into 'master' 2015-12-28 12:44:03 +00:00
db Grace period support for TFA 2015-12-24 19:01:30 -02:00
doc Merge branch 'environment-variables-in-the-app' into 'master' 2015-12-28 12:44:03 +00:00
docker
features fix spinach 2015-12-25 14:11:19 +02:00
fixtures/emojis Emoji picker: better alias handling 2015-12-24 11:28:55 +02:00
lib Merge branch 'mention-all' into 'master' 2015-12-27 21:09:16 +00:00
log
public
scripts
shared Make sure everyone has shared/lfs-objects 2015-12-09 16:19:59 +01:00
spec Merge branch 'mention-all' into 'master' 2015-12-27 21:09:16 +00:00
tmp
vendor/assets
.flayignore
.foreman
.gitattributes
.gitignore
.gitlab-ci.yml Precompile assets before running feature specs. #4662 2015-12-28 00:40:37 -05:00
.hound.yml
.pkgr.yml
.rspec
.rubocop.yml Disabled Rails/Date cop 2015-12-15 00:54:26 -02:00
.ruby-version
.simplecov
.teatro.yml
CHANGELOG Merge branch 'disable-git-follow' into 'master' 2015-12-28 12:05:55 +00:00
CONTRIBUTING.md Fixed wrong URL to "up for grabs" issue filter 2015-12-21 15:20:35 +01:00
GITLAB_SHELL_VERSION Use gitlab-shell 2.6.9 2015-12-17 20:54:27 +01:00
GITLAB_WORKHORSE_VERSION Use gitlab-workhorse 0.5.1 2015-12-17 11:55:13 +01:00
Gemfile Merge branch 'add-recaptcha-support' into 'master' 2015-12-28 11:55:21 +00:00
Gemfile.lock Merge branch 'add-recaptcha-support' into 'master' 2015-12-28 11:55:21 +00:00
LICENSE
MAINTENANCE.md
PROCESS.md update guides for feature proposals on the issue tracker 2015-12-14 13:06:16 +01:00
Procfile Merge branch 'fix_mailer_queue' into 'master' 2015-12-04 11:48:32 +00:00
README.md Bump Redis requirement to 2.8 for Sidekiq 4 requirements 2015-12-12 07:51:50 -08:00
Rakefile
VERSION Bump version 2015-12-22 16:37:18 +01:00
config.ru
doc_styleguide.md
docker-compose.yml

README.md

GitLab

build status Build Status Code Climate Coverage Status

Canonical source

The source of GitLab Community Edition is hosted on GitLab.com and there are mirrors to make contributing as easy as possible.

Open source software to collaborate on code

To see how GitLab looks please see the features page on our website.

  • Manage Git repositories with fine grained access controls that keep your code secure
  • Perform code reviews and enhance collaboration with merge requests
  • Each project can also have an issue tracker and a wiki
  • Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
  • Completely free and open source (MIT Expat license)
  • Powered by Ruby on Rails

Editions

There are two editions of GitLab:

  • GitLab Community Edition (CE) is available freely under the MIT Expat license.
  • GitLab Enterprise Edition (EE) includes extra features that are more useful for organizations with more than 100 users. To use EE and get official support please become a subscriber.

Website

On about.gitlab.com you can find more information about:

Requirements

Please see the requirements documentation for system requirements and more information about the supported operating systems.

Installation

The recommended way to install GitLab is with the Omnibus packages on our package server. Compared to an installation from source, this is faster and less error prone. Just select your operating system, download the respective package (Debian or RPM) and install it using the system's package manager.

There are various other options to install GitLab, please refer to the installation page on the GitLab website for more information.

You can access a new installation with the login root and password 5iveL!fe, after login you are required to set a unique password.

Install a development environment

To work on GitLab itself, we recommend setting up your development environment with the GitLab Development Kit. If you do not use the GitLab Development Kit you need to install and setup all the dependencies yourself, this is a lot of work and error prone. One small thing you also have to do when installing it yourself is to copy the example development unicorn configuration file:

cp config/unicorn.rb.example.development config/unicorn.rb

Instructions on how to start GitLab and how to run the tests can be found in the development section of the GitLab Development Kit.

Software stack

GitLab is a Ruby on Rails application that runs on the following software:

  • Ubuntu/Debian/CentOS/RHEL
  • Ruby (MRI) 2.1
  • Git 1.7.10+
  • Redis 2.8+
  • MySQL or PostgreSQL

For more information please see the architecture documentation.

Third-party applications

There are a lot of third-party applications integrating with GitLab. These include GUI Git clients, mobile applications and API wrappers for various languages.

GitLab release cycle

For more information about the release process see the release documentation.

Upgrading

For upgrading information please see our update page.

Documentation

All documentation can be found on doc.gitlab.com/ce/.

Getting help

Please see Getting help for GitLab on our website for the many options to get help.

Is it any good?

Yes

Is it awesome?

Thanks for asking this question Joshua. These people seem to like it.