Created
March 8, 2022 20:29
-
-
Save anselmobattisti/ebfbb98d521f063b3d568cd6ba803130 to your computer and use it in GitHub Desktop.
Configuration of gitlab to use an e-email hosted in a cPanel account. Also use SSL via Caddy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:443 { | |
tls internal { | |
on_demand | |
} | |
reverse_proxy localhost:8929 { | |
header_up Host {host} | |
header_up X-Real-IP {remote} | |
header_up X-Forwarded-For {remote} | |
header_up X-Forwarded-Port {server_port} | |
header_up X-Forwarded-Proto {scheme} | |
health_timeout 5s | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.6' | |
services: | |
caddy: | |
image: caddy:latest | |
restart: unless-stopped | |
ports: | |
- '80:80' | |
- '443:443' | |
volumes: | |
- './caddy/Caddyfile:/etc/caddy/Caddyfile' | |
- gitcaddy:/data | |
- gitcaddy:/config | |
networks: | |
- gitlab_net | |
web: | |
image: 'gitlab/gitlab-ee:latest' | |
restart: always | |
hostname: "your_domain.com" | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'https://localhost:8929' | |
GITLAB_ROOT_EMAIL="your@email.com" | |
GITLAB_ROOT_PASSWORD="your_pass" | |
gitlab_rails['smtp_enable'] = true | |
gitlab_rails['smtp_address'] = "cpanel_domain" | |
gitlab_rails['smtp_port'] = 587 | |
gitlab_rails['smtp_authentication'] = "plain" | |
gitlab_rails['smtp_enable_starttls_auto'] = true | |
gitlab_rails['smtp_user_name'] = "your@email.com" | |
gitlab_rails['smtp_password'] = "pass" | |
gitlab_rails['smtp_domain'] = "email.com" | |
gitlab_rails['smtp_openssl_verify_mode'] = 'none' | |
# ITS MANDATORY TO DEFINE THIS VARIABLES | |
gitlab_rails['gitlab_email_from'] = 'your@email.com' | |
gitlab_rails['gitlab_email_reply_to'] = 'your@email.com' | |
ports: | |
- '8929:8929' | |
- '2224:22' | |
volumes: | |
- './gitlab/config:/etc/gitlab' | |
- './gitlab/logs:/var/log/gitlab' | |
- './gitlab/data:/var/opt/gitlab' | |
shm_size: '256m' | |
networks: | |
- gitlab_net | |
networks: | |
gitlab_net: | |
driver: bridge | |
volumes: | |
gitcaddy: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment