fix: gitlab service

This commit is contained in:
Andras Bacsai
2024-07-25 14:14:00 +02:00
parent 47fa955e71
commit f558f01ffd
3 changed files with 34 additions and 11 deletions

View File

@@ -576,6 +576,30 @@ class Service extends BaseModel
$fields->put('Vaultwarden', $data); $fields->put('Vaultwarden', $data);
break; break;
case str($image)->contains('gitlab/gitlab'):
$password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_GITLAB')->first();
$data = collect([]);
if ($password) {
$data = $data->merge([
'Root Password' => [
'key' => data_get($password, 'key'),
'value' => data_get($password, 'value'),
'rules' => 'required',
'isPassword' => true,
],
]);
}
$data = $data->merge([
'Root User' => [
'key' => 'N/A',
'value' => 'root',
'rules' => 'required',
'isPassword' => true,
],
]);
$fields->put('GitLab', $data->toArray());
break;
} }
} }
$databases = $this->databases()->get(); $databases = $this->databases()->get();

View File

@@ -1,17 +1,17 @@
# documentation: https://docs.gitlab.com/ee/install/docker.html # documentation: https://docs.gitlab.com/ee/install/docker.html
# slogan: GitLab: The all-in-one DevOps platform for seamless collaboration and continuous delivery. # slogan: The all-in-one DevOps platform for seamless collaboration and continuous delivery.
# tags: gitlab, devops, continuousintegration, continuousdelivery, versioncontrol, collaboration, ci/cd, sourcecodemanagement, automation, codereview, agiledevelopment, projectmanagement, opensource, repositoryhosting, pipelineautomation, git, softwaredevelopment, issuetracking, teamcollaboration, deploymentautomation, securityintegration # tags: gitlab, devops, continuousintegration, continuousdelivery, versioncontrol, collaboration, ci/cd, sourcecodemanagement, automation, codereview, agiledevelopment, projectmanagement, opensource, repositoryhosting, pipelineautomation, git, softwaredevelopment, issuetracking, teamcollaboration, deploymentautomation, securityintegration
# icon: svgs/gitlab.svg # icon: svgs/gitlab.svg
# port: 80 # port: 80
services: services:
gitlab: gitlab:
image: 'gitlab/gitlab-ce:latest' image: "gitlab/gitlab-ce:latest"
container_name: gitlab
restart: always
hostname: '${SERVICE_URL_GITLAB}'
environment: environment:
- SERVICE_FQDN_GITLAB_80 - SERVICE_FQDN_GITLAB_80
- TZ=${TZ:-UTC}
- GITLAB_TIMEZONE=${GITLAB_TIMEZONE:-UTC}
- GITLAB_ROOT_PASSWORD=$SERVICE_PASSWORD_GITLAB
- EXTERNAL_URL=$SERVICE_FQDN_GITLAB - EXTERNAL_URL=$SERVICE_FQDN_GITLAB
- GITLAB_HOST=$SERVICE_FQDN_GITLAB - GITLAB_HOST=$SERVICE_FQDN_GITLAB
- GITLAB_SMTP_ENABLE=${GITLAB_SMTP_ENABLE:-false} - GITLAB_SMTP_ENABLE=${GITLAB_SMTP_ENABLE:-false}
@@ -26,10 +26,9 @@ services:
- GITLAB_EMAIL_REPLY_TO=$GITLAB_EMAIL_REPLY_TO - GITLAB_EMAIL_REPLY_TO=$GITLAB_EMAIL_REPLY_TO
- 'GITLAB_OMNIBUS_CONFIG=external_url "${SERVICE_FQDN_GITLAB}"; nginx["listen_https"] = false; nginx["listen_port"] = 80; gitlab_rails["gitlab_shell_ssh_port"] = 2222; gitlab_rails["smtp_enable"] = ${GITLAB_SMTP_ENABLE}; gitlab_rails["smtp_address"] = "${GITLAB_SMTP_ADDRESS}"; gitlab_rails["smtp_port"] = ${GITLAB_SMTP_PORT}; gitlab_rails["smtp_user_name"] = "${GITLAB_SMTP_USER_NAME}"; gitlab_rails["smtp_password"] = "${GITLAB_SMTP_PASSWORD}"; gitlab_rails["smtp_domain"] = "${GITLAB_SMTP_DOMAIN}"; gitlab_rails["smtp_authentication"] = "login"; gitlab_rails["smtp_enable_starttls_auto"] = ${GITLAB_STARTTLS_AUTO}; gitlab_rails["smtp_tls"] = ${GITLAB_SMTP_TLS}; gitlab_rails["gitlab_email_from"] = "${GITLAB_EMAIL_FROM}"; gitlab_rails["gitlab_email_reply_to"] = "${GITLAB_EMAIL_REPLY_TO}";' - 'GITLAB_OMNIBUS_CONFIG=external_url "${SERVICE_FQDN_GITLAB}"; nginx["listen_https"] = false; nginx["listen_port"] = 80; gitlab_rails["gitlab_shell_ssh_port"] = 2222; gitlab_rails["smtp_enable"] = ${GITLAB_SMTP_ENABLE}; gitlab_rails["smtp_address"] = "${GITLAB_SMTP_ADDRESS}"; gitlab_rails["smtp_port"] = ${GITLAB_SMTP_PORT}; gitlab_rails["smtp_user_name"] = "${GITLAB_SMTP_USER_NAME}"; gitlab_rails["smtp_password"] = "${GITLAB_SMTP_PASSWORD}"; gitlab_rails["smtp_domain"] = "${GITLAB_SMTP_DOMAIN}"; gitlab_rails["smtp_authentication"] = "login"; gitlab_rails["smtp_enable_starttls_auto"] = ${GITLAB_STARTTLS_AUTO}; gitlab_rails["smtp_tls"] = ${GITLAB_SMTP_TLS}; gitlab_rails["gitlab_email_from"] = "${GITLAB_EMAIL_FROM}"; gitlab_rails["gitlab_email_reply_to"] = "${GITLAB_EMAIL_REPLY_TO}";'
ports: ports:
- '2222:22' - "2222:22"
volumes: volumes:
- 'gitlab-config:/etc/gitlab' - "gitlab-config:/etc/gitlab"
- 'gitlab-logs:/var/log/gitlab' - "gitlab-logs:/var/log/gitlab"
- 'gitlab-data:/var/opt/gitlab' - "gitlab-data:/var/opt/gitlab"
shm_size: 256m shm_size: 256m

File diff suppressed because one or more lines are too long