Send email with Gitlab docker image 1

Send email with Gitlab docker image

environment:
    GITLAB_OMNIBUS_CONFIG: |
        gitlab_rails['smtp_enable'] = true 
        gitlab_rails['smtp_address'] = "***"
        gitlab_rails['smtp_port'] = 465    
        gitlab_rails['smtp_user_name'] = "***"
        gitlab_rails['smtp_password'] = "***"
        gitlab_rails['smtp_enable_starttls_auto'] = true
        gitlab_rails['smtp_tls'] = true    
        gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

Here is what the above code is Doing:
1. We are using the official GitLab image from Docker Hub.
2. We are exposing the default HTTP and SSH ports.
3. We are mounting the host directory /srv/gitlab/config as /etc/gitlab inside the container, so that any configuration changes we make survives a restart or upgrade.
4. We are mounting the host directory /srv/gitlab/logs as /var/log/gitlab inside the container, so that the log files are persisted on the host.
5. We are mounting the host directory /srv/gitlab/data as /var/opt/gitlab inside the container, so that the Git repository data is persisted on the host.
6. We are setting the external URL for GitLab in an environment variable.
7. We are setting the SMTP configuration in an environment variable.

Similar Posts