docker gitlab启动参数

Available Configuration Parameters

Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can use docker-compose.

Below is the complete list of available options that can be used to customize your gitlab installation.

ParameterDescription
DEBUGSet this to true to enable entrypoint debugging.
GITLAB_HOSTThe hostname of the GitLab server. Defaults to localhost
GITLAB_CI_HOSTIf you are migrating from GitLab CI use this parameter to configure the redirection to the GitLab service so that your existing runners continue to work without any changes. No defaults.
GITLAB_PORTThe port of the GitLab server. This value indicates the public port on which the GitLab application will be accessible on the network and appropriately configures GitLab to generate the correct urls. It does not affect the port on which the internal nginx server will be listening on. Defaults to 443 if GITLAB_HTTPS=true, else defaults to80.
GITLAB_SECRETS_DB_KEY_BASEEncryption key for GitLab CI secret variables, as well as import credentials, in the database. Ensure that your key is at least 32 characters long and that you don't lose it. You can generate one using pwgen -Bsv1 64. If you are migrating from GitLab CI, you need to set this value to the value of GITLAB_CI_SECRETS_DB_KEY_BASE. No defaults.
GITLAB_SECRETS_SECRET_KEY_BASEEncryption key for session secrets. Ensure that your key is at least 64 characters long and that you don't lose it. This secret can be rotated with minimal impact - the main effect is that previously-sent password reset emails will no longer work. You can generate one using pwgen -Bsv1 64. No defaults.
GITLAB_SECRETS_OTP_KEY_BASEEncryption key for OTP related stuff with GitLab. Ensure that your key is at least 64 characters long and that you don't lose it. If you lose or change this secret, 2FA will stop working for all users.You can generate one using pwgen -Bsv1 64. No defaults.
GITLAB_TIMEZONEConfigure the timezone for the gitlab application. This configuration does not effect cron jobs. Defaults to UTC. See the list of acceptable values.
GITLAB_ROOT_PASSWORDThe password for the root user on firstrun. Defaults to 5iveL!fe.
GITLAB_ROOT_EMAILThe email for the root user on firstrun. Defaults toadmin@example.com
GITLAB_EMAILThe email address for the GitLab server. Defaults to value ofSMTP_USER, else defaults to example@example.com.
GITLAB_EMAIL_DISPLAY_NAMEThe name displayed in emails sent out by the GitLab mailer. Defaults to GitLab.
GITLAB_EMAIL_REPLY_TOThe reply-to address of emails sent out by GitLab. Defaults to value of GITLAB_EMAIL, else defaults to noreply@example.com.
GITLAB_EMAIL_SUBJECT_SUFFIXThe e-mail subject suffix used in e-mails sent by GitLab. No defaults.
GITLAB_EMAIL_ENABLEDEnable or disable gitlab mailer. Defaults to the SMTP_ENABLEDconfiguration.
GITLAB_INCOMING_EMAIL_ADDRESSThe incoming email address for reply by email. Defaults to the value of IMAP_USER, else defaults to reply@example.com. Please read the reply by email documentation to curretly set this parameter.
GITLAB_INCOMING_EMAIL_ENABLEDEnable or disable gitlab reply by email feature. Defaults to the value of IMAP_ENABLED.
GITLAB_SIGNUP_ENABLEDEnable or disable user signups (first run only). Default is true.
GITLAB_PROJECTS_LIMITSet default projects limit. Defaults to 100.
GITLAB_USERNAME_CHANGEEnable or disable ability for users to change their username. Defaults to true.
GITLAB_CREATE_GROUPEnable or disable ability for users to create groups. Defaults totrue.
GITLAB_PROJECTS_ISSUESSet if issues feature should be enabled by default for new projects. Defaults to true.
GITLAB_PROJECTS_MERGE_REQUESTSSet if merge requests feature should be enabled by default for new projects. Defaults to true.
GITLAB_PROJECTS_WIKISet if wiki feature should be enabled by default for new projects. Defaults to true.
GITLAB_PROJECTS_SNIPPETSSet if snippets feature should be enabled by default for new projects. Defaults to false.
GITLAB_PROJECTS_BUILDSSet if builds feature should be enabled by default for new projects. Defaults to true.
GITLAB_PROJECTS_CONTAINER_REGISTRYSet if container_registry feature should be enabled by default for new projects. Defaults to true.
GITLAB_WEBHOOK_TIMEOUTSets the timeout for webhooks. Defaults to 10 seconds.
GITLAB_TIMEOUTSets the timeout for git commands. Defaults to 10 seconds.
GITLAB_MAX_OBJECT_SIZEMaximum size (in bytes) of a git object (eg. a commit) in bytes. Defaults to 20971520, i.e. 20 megabytes.
GITLAB_NOTIFY_ON_BROKEN_BUILDSEnable or disable broken build notification emails. Defaults to true
GITLAB_NOTIFY_PUSHERAdd pusher to recipients list of broken build notification emails. Defaults to false
GITLAB_REPOS_DIRThe git repositories folder in the container. Defaults to/home/git/data/repositories
GITLAB_BACKUP_DIRThe backup folder in the container. Defaults to/home/git/data/backups
GITLAB_BUILDS_DIRThe build traces directory. Defaults to /home/git/data/builds
GITLAB_DOWNLOADS_DIRThe repository downloads directory. A temporary zip is created in this directory when users click Download Zip on a project. Defaults to /home/git/data/tmp/downloads.
GITLAB_SHARED_DIRThe directory to store the build artifacts. Defaults to/home/git/data/shared
GITLAB_ARTIFACTS_ENABLEDEnable/Disable GitLab artifacts support. Defaults to true.
GITLAB_ARTIFACTS_DIRDirectory to store the artifacts. Defaults to$GITLAB_SHARED_DIR/artifacts
GITLAB_LFS_ENABLEDEnable/Disable Git LFS support. Defaults to true.
GITLAB_LFS_OBJECTS_DIRDirectory to store the lfs-objects. Defaults to$GITLAB_SHARED_DIR/lfs-objects
GITLAB_BACKUP_SCHEDULESetup cron job to automatic backups. Possible values disable,dailyweekly or monthly. Disabled by default
GITLAB_BACKUP_EXPIRYConfigure how long (in seconds) to keep backups before they are deleted. By default when automated backups are disabled backups are kept forever (0 seconds), else the backups expire in 7 days (604800 seconds).
GITLAB_BACKUP_PG_SCHEMASpecify the PostgreSQL schema for the backups. No defaults, which means that all schemas will be backed up. see #524
GITLAB_BACKUP_ARCHIVE_PERMISSIONSSets the permissions of the backup archives. Defaults to 0600See
GITLAB_BACKUP_TIMESet a time for the automatic backups in HH:MM format. Defaults to04:00.
GITLAB_BACKUP_SKIPSpecified sections are skipped by the backups. Defaults to empty, i.e. lfs,uploadsSee
GITLAB_SSH_HOSTThe ssh host. Defaults to GITLAB_HOST.
GITLAB_SSH_PORTThe ssh port number. Defaults to 22.
GITLAB_RELATIVE_URL_ROOTThe relative url of the GitLab server, e.g. /git. No default.
GITLAB_TRUSTED_PROXIESAdd IP address reverse proxy to trusted proxy list, otherwise users will appear signed in from that address. Currently only a single entry is permitted. No defaults.
GITLAB_REGISTRY_ENABLEDEnables the GitLab Container Registry. Defaults to false.
GITLAB_REGISTRY_HOSTSets the GitLab Registry Host. Defaults to registry.example.com
GITLAB_REGISTRY_PORTSets the GitLab Registry Port. Defaults to 443.
GITLAB_REGISTRY_API_URLSets the GitLab Registry API URL. Defaults tohttp://localhost:5000
GITLAB_REGISTRY_KEY_PATHSets the GitLab Registry Key Path. Defaults to config/registry.key
GITLAB_REGISTRY_DIRDirectory to store the container images will be shared with registry. Defaults to $GITLAB_SHARED_DIR/registry
GITLAB_REGISTRY_ISSUERSets the GitLab Registry Issuer. Defaults to gitlab-issuer.
GITLAB_HTTPSSet to true to enable https support, disabled by default.
SSL_SELF_SIGNEDSet to true when using self signed ssl certificates. false by default.
SSL_CERTIFICATE_PATHLocation of the ssl certificate. Defaults to/home/git/data/certs/gitlab.crt
SSL_KEY_PATHLocation of the ssl private key. Defaults to/home/git/data/certs/gitlab.key
SSL_DHPARAM_PATHLocation of the dhparam file. Defaults to/home/git/data/certs/dhparam.pem
SSL_VERIFY_CLIENTEnable verification of client certificates using theSSL_CA_CERTIFICATES_PATH file. Defaults to false
SSL_CA_CERTIFICATES_PATHList of SSL certificates to trust. Defaults to/home/git/data/certs/ca.crt.
SSL_REGISTRY_KEY_PATHLocation of the ssl private key for gitlab container registry. Defaults to /home/git/data/certs/registry.key
SSL_REGISTRY_CERT_PATHLocation of the ssl certificate for the gitlab container registry. Defaults to /home/git/data/certs/registry.crt
SSL_CIPHERSList of supported SSL ciphers: Defaults to ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
NGINX_WORKERSThe number of nginx workers to start. Defaults to 1.
NGINX_SERVER_NAMES_HASH_BUCKET_SIZESets the bucket size for the server names hash tables. This is needed when you have long server_names or your an error message from nginx like nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size:... It should be only increment by a power of 2. Defaults to 32.
NGINX_HSTS_ENABLEDAdvanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults totrue. See #138 for use case scenario.
NGINX_HSTS_MAXAGEAdvanced configuration option for setting the HSTS max-age in the gitlab nginx vHost configuration. Applicable only when SSL is in use. Defaults to 31536000.
NGINX_PROXY_BUFFERINGEnable proxy_buffering. Defaults to off.
NGINX_ACCEL_BUFFERINGEnable X-Accel-Buffering header. Default to no
NGINX_X_FORWARDED_PROTOAdvanced configuration option for the proxy_set_header X-Forwarded-Proto setting in the gitlab nginx vHost configuration. Defaults to https when GITLAB_HTTPS is true, else defaults to$scheme.
REDIS_HOSTThe hostname of the redis server. Defaults to localhost
REDIS_PORTThe connection port of the redis server. Defaults to 6379.
REDIS_DB_NUMBERThe redis database number. Defaults to '0'.
UNICORN_WORKERSThe number of unicorn workers to start. Defaults to 3.
UNICORN_TIMEOUTSets the timeout of unicorn worker processes. Defaults to 60seconds.
SIDEKIQ_CONCURRENCYThe number of concurrent sidekiq jobs to run. Defaults to 25
SIDEKIQ_SHUTDOWN_TIMEOUTTimeout for sidekiq shutdown. Defaults to 4
SIDEKIQ_MEMORY_KILLER_MAX_RSSNon-zero value enables the SidekiqMemoryKiller. Defaults to1000000. For additional options refer Configuring the MemoryKiller
DB_ADAPTERThe database type. Possible values: mysql2postgresql. Defaults to postgresql.
DB_ENCODINGThe database encoding. For DB_ADAPTER values postresql andmysql2, this parameter defaults to unicode and utf8 respectively.
DB_HOSTThe database server hostname. Defaults to localhost.
DB_PORTThe database server port. Defaults to 3306 for mysql and 5432 for postgresql.
DB_NAMEThe database database name. Defaults to gitlabhq_production
DB_USERThe database database user. Defaults to root
DB_PASSThe database database password. Defaults to no password
DB_POOLThe database database connection pool count. Defaults to 10.
SMTP_ENABLEDEnable mail delivery via SMTP. Defaults to true if SMTP_USER is defined, else defaults to false.
SMTP_DOMAINSMTP domain. Defaults towww.gmail.com
SMTP_HOSTSMTP server host. Defaults to smtp.gmail.com.
SMTP_PORTSMTP server port. Defaults to 587.
SMTP_USERSMTP username.
SMTP_PASSSMTP password.
SMTP_STARTTLSEnable STARTTLS. Defaults to true.
SMTP_TLSEnable SSL/TLS. Defaults to false.
SMTP_OPENSSL_VERIFY_MODESMTP openssl verification mode. Accepted values are nonepeer,client_once and fail_if_no_peer_cert. Defaults to none.
SMTP_AUTHENTICATIONSpecify the SMTP authentication method. Defaults to login ifSMTP_USER is set.
SMTP_CA_ENABLEDEnable custom CA certificates for SMTP email configuration. Defaults to false.
SMTP_CA_PATHSpecify the ca_path parameter for SMTP email configuration. Defaults to /home/git/data/certs.
SMTP_CA_FILESpecify the ca_file parameter for SMTP email configuration. Defaults to /home/git/data/certs/ca.crt.
IMAP_ENABLEDEnable mail delivery via IMAP. Defaults to true if IMAP_USER is defined, else defaults to false.
IMAP_HOSTIMAP server host. Defaults to imap.gmail.com.
IMAP_PORTIMAP server port. Defaults to 993.
IMAP_USERIMAP username.
IMAP_PASSIMAP password.
IMAP_SSLEnable SSL. Defaults to true.
IMAP_STARTTLSEnable STARTSSL. Defaults to false.
IMAP_MAILBOXThe name of the mailbox where incoming mail will end up. Defaults to inbox.
LDAP_ENABLEDEnable LDAP. Defaults to false
LDAP_LABELLabel to show on login tab for LDAP server. Defaults to 'LDAP'
LDAP_HOSTLDAP Host
LDAP_PORTLDAP Port. Defaults to 389
LDAP_UIDLDAP UID. Defaults to sAMAccountName
LDAP_METHODLDAP method, Possible values are ssltls and plain. Defaults to plain
LDAP_BIND_DNNo default.
LDAP_PASSLDAP password
LDAP_TIMEOUTTimeout, in seconds, for LDAP queries. Defaults to 10.
LDAP_ACTIVE_DIRECTORYSpecifies if LDAP server is Active Directory LDAP server. If your LDAP server is not AD, set this to false. Defaults to true,
LDAP_ALLOW_USERNAME_OR_EMAIL_LOGINIf enabled, GitLab will ignore everything after the first '@' in the LDAP username submitted by the user on login. Defaults to falseif LDAP_UID is userPrincipalName, else true.
LDAP_BLOCK_AUTO_CREATED_USERSLocks down those users until they have been cleared by the admin. Defaults to false.
LDAP_BASEBase where we can search for users. No default.
LDAP_USER_FILTERFilter LDAP users. No default.
OAUTH_ENABLEDEnable OAuth support. Defaults to true if any of the support OAuth providers is configured, else defaults to false.
OAUTH_AUTO_SIGN_IN_WITH_PROVIDERAutomatically sign in with a specific OAuth provider without showing GitLab sign-in page. Accepted values are cas3github,bitbucketgitlabgoogle_oauth2facebooktwittersaml,crowdauth0 and azure_oauth2. No default.
OAUTH_ALLOW_SSOComma separated list of oauth providers for single sign-on. This allows users to login without having a user account. The account is created automatically when authentication is successful. Accepted values are cas3githubbitbucketgitlabgoogle_oauth2,facebooktwittersamlcrowdauth0 and azure_oauth2. No default.
OAUTH_BLOCK_AUTO_CREATED_USERSLocks down those users until they have been cleared by the admin. Defaults to true.
OAUTH_AUTO_LINK_LDAP_USERLook up new users in LDAP servers. If a match is found (same uid), automatically link the omniauth identity with the LDAP account. Defaults to false.
OAUTH_AUTO_LINK_SAML_USERAllow users with existing accounts to login and auto link their account via SAML login, without having to do a manual login first and manually add SAML. Defaults to false.
OAUTH_EXTERNAL_PROVIDERSComma separated list if oauth providers to disallow access tointernal projects. Users creating accounts via these providers will have access internal projects. Accepted values are cas3github,bitbucketgitlabgoogle_oauth2facebooktwittersaml,crowdauth0 and azure_oauth2. No default.
OAUTH_CAS3_LABELThe "Sign in with" button label. Defaults to "cas3".
OAUTH_CAS3_SERVERCAS3 server URL. No defaults.
OAUTH_CAS3_DISABLE_SSL_VERIFICATIONDisable CAS3 SSL verification. Defaults to false.
OAUTH_CAS3_LOGIN_URLCAS3 login URL. Defaults to /cas/login
OAUTH_CAS3_VALIDATE_URLCAS3 validation URL. Defaults to /cas/p3/serviceValidate
OAUTH_CAS3_LOGOUT_URLCAS3 logout URL. Defaults to /cas/logout
OAUTH_GOOGLE_API_KEYGoogle App Client ID. No defaults.
OAUTH_GOOGLE_APP_SECRETGoogle App Client Secret. No defaults.
OAUTH_GOOGLE_RESTRICT_DOMAINList of Google App restricted domains. Value is comma separated list of single quoted groups. Example:'exemple.com','exemple2.com'. No defaults.
OAUTH_FACEBOOK_API_KEYFacebook App API key. No defaults.
OAUTH_FACEBOOK_APP_SECRETFacebook App API secret. No defaults.
OAUTH_TWITTER_API_KEYTwitter App API key. No defaults.
OAUTH_TWITTER_APP_SECRETTwitter App API secret. No defaults.
OAUTH_GITHUB_API_KEYGitHub App Client ID. No defaults.
OAUTH_GITHUB_APP_SECRETGitHub App Client secret. No defaults.
OAUTH_GITHUB_URLUrl to the GitHub Enterprise server. Defaults to https://github.com
OAUTH_GITHUB_VERIFY_SSLEnable SSL verification while communicating with the GitHub server. Defaults to true.
OAUTH_GITLAB_API_KEYGitLab App Client ID. No defaults.
OAUTH_GITLAB_APP_SECRETGitLab App Client secret. No defaults.
OAUTH_BITBUCKET_API_KEYBitBucket App Client ID. No defaults.
OAUTH_BITBUCKET_APP_SECRETBitBucket App Client secret. No defaults.
OAUTH_SAML_ASSERTION_CONSUMER_SERVICE_URLThe URL at which the SAML assertion should be received. WhenGITLAB_HTTPS=true, defaults tohttps://${GITLAB_HOST}/users/auth/saml/callback else defaults tohttp://${GITLAB_HOST}/users/auth/saml/callback.
OAUTH_SAML_IDP_CERT_FINGERPRINTThe SHA1 fingerprint of the certificate. No Defaults.
OAUTH_SAML_IDP_SSO_TARGET_URLThe URL to which the authentication request should be sent. No defaults.
OAUTH_SAML_ISSUERThe name of your application. When GITLAB_HTTPS=true, defaults tohttps://${GITLAB_HOST} else defaults to http://${GITLAB_HOST}.
OAUTH_SAML_LABELThe "Sign in with" button label. Defaults to "Our SAML Provider".
OAUTH_SAML_NAME_IDENTIFIER_FORMATDescribes the format of the username required by GitLab, Defaults to urn:oasis:names:tc:SAML:2.0:nameid-format:transient
OAUTH_SAML_GROUPS_ATTRIBUTEMap groups attribute in a SAMLResponse to external groups. No defaults.
OAUTH_SAML_EXTERNAL_GROUPSList of external groups in a SAMLResponse. Value is comma separated list of single quoted groups. Example:'group1','group2'. No defaults.
OAUTH_SAML_ATTRIBUTE_STATEMENTS_EMAILMap 'email' attribute name in a SAMLResponse to entries in the OmniAuth info hash, No defaults. See GitLab documentation for more details.
OAUTH_SAML_ATTRIBUTE_STATEMENTS_NAMEMap 'name' attribute in a SAMLResponse to entries in the OmniAuth info hash, No defaults. See GitLab documentation for more details.
OAUTH_SAML_ATTRIBUTE_STATEMENTS_FIRST_NAMEMap 'first_name' attribute in a SAMLResponse to entries in the OmniAuth info hash, No defaults. See GitLab documentation for more details.
OAUTH_SAML_ATTRIBUTE_STATEMENTS_LAST_NAMEMap 'last_name' attribute in a SAMLResponse to entries in the OmniAuth info hash, No defaults. See GitLab documentation for more details.
OAUTH_CROWD_SERVER_URLCrowd server url. No defaults.
OAUTH_CROWD_APP_NAMECrowd server application name. No defaults.
OAUTH_CROWD_APP_PASSWORDCrowd server application password. No defaults.
OAUTH_AUTH0_CLIENT_IDAuth0 Client ID. No defaults.
OAUTH_AUTH0_CLIENT_SECRETAuth0 Client secret. No defaults.
OAUTH_AUTH0_DOMAINAuth0 Domain. No defaults.
OAUTH_AZURE_API_KEYAzure Client ID. No defaults.
OAUTH_AZURE_API_SECRETAzure Client secret. No defaults.
OAUTH_AZURE_TENANT_IDAzure Tenant ID. No defaults.
GITLAB_GRAVATAR_ENABLEDEnables gravatar integration. Defaults to true.
GITLAB_GRAVATAR_HTTP_URLSets a custom gravatar url. Defaults tohttp://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon. This can be used for Libravatar integration.
GITLAB_GRAVATAR_HTTPS_URLSame as above, but for https. Defaults tohttps://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon.
USERMAP_UIDSets the uid for user git to the specified uid. Defaults to 1000.
USERMAP_GIDSets the gid for group git to the specified gid. Defaults toUSERMAP_UID if defined, else defaults to 1000.
GOOGLE_ANALYTICS_IDGoogle Analytics ID. No defaults.
PIWIK_URLSets the Piwik URL. No defaults.
PIWIK_SITE_IDSets the Piwik site ID. No defaults.
AWS_BACKUPSEnables automatic uploads to an Amazon S3 instance. Defaults tofalse.
AWS_BACKUP_REGIONAWS region. No defaults.
AWS_BACKUP_ACCESS_KEY_IDAWS access key id. No defaults.
AWS_BACKUP_SECRET_ACCESS_KEYAWS secret access key. No defaults.
AWS_BACKUP_BUCKETAWS bucket for backup uploads. No defaults.
AWS_BACKUP_MULTIPART_CHUNK_SIZEEnables mulitpart uploads when file size reaches a defined size. See at AWS S3 Docs
GITLAB_ROBOTS_PATHLocation of custom robots.txt. Uses GitLab's default robots.txtconfiguration by default. See www.robotstxt.org for examples.
RACK_ATTACK_ENABLEDEnable/disable rack middleware for blocking & throttling abusive requests Defaults to true.
RACK_ATTACK_WHITELISTAlways allow requests from whitelisted host. Defaults to 127.0.0.1
RACK_ATTACK_MAXRETRYNumber of failed auth attempts before which an IP should be banned. Defaults to 10
RACK_ATTACK_FINDTIMENumber of seconds before resetting the per IP auth attempt counter. Defaults to 60.
RACK_ATTACK_BANTIMENumber of seconds an IP should be banned after too many auth attempts. Defaults to 3600.
GITLAB_WORKHORSE_TIMEOUTTimeout for gitlab workhorse http proxy. Defaults to 5m0s.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值