reorganize production containers

This commit is contained in:
root
2026-05-10 23:43:13 -04:00
committed by Administrator
parent d24794813d
commit f1c7fec162
2 changed files with 24 additions and 113 deletions
-84
View File
@@ -46,87 +46,3 @@ docker compose -f traefik.yaml up -d
docker compose -f docker-compose.production.yml up --build -d
services:
gitlab:
image: gitlab/gitlab-ce:latest
restart: unless-stopped
hostname: ${DOMAIN_NAME}
# Traefik will handle 80/443 on the host.
# Keep SSH exposed separately (pick a fixed port on the host).
ports:
- "2222:22"
environment:
GITLAB_OMNIBUS_CONFIG: |
# Public URL should be HTTPS (Traefik terminates TLS)
external_url 'https://${DOMAIN_NAME}'
# GitLab listens internally on HTTP; Traefik provides HTTPS
nginx['listen_port'] = 80
nginx['listen_https'] = false
# Help GitLab understand it's behind a TLS-terminating proxy
nginx['proxy_set_headers'] = {
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_rails['initial_root_password'] = '${ROOT_PASSWORD}'
# -------------------------
# SMTP (required for invites)
# -------------------------
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "${SMTP_HOST}"
gitlab_rails['smtp_port'] = ${SMTP_PORT}
gitlab_rails['smtp_user_name'] = "${SMTP_USER}"
gitlab_rails['smtp_password'] = "${SMTP_PASS}"
gitlab_rails['smtp_domain'] = "${SMTP_DOMAIN}"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
# Optional: if you use port 465 (implicit TLS), set:
# gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = "${SMTP_FROM}"
gitlab_rails['gitlab_email_reply_to'] = "${SMTP_REPLY_TO}"
GITLAB_ROOT_EMAIL: ${ROOT_EMAIL}
volumes:
- gitlab-config:/etc/gitlab
- gitlab-logs:/var/log/gitlab
- gitlab-data:/var/opt/gitlab
shm_size: '256m'
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
- net.ipv6.conf.default.disable_ipv6=1
labels:
- traefik.enable=true
- traefik.http.routers.gitlab.rule=Host(`${DOMAIN_NAME}`)
- traefik.http.routers.gitlab.tls=true
- traefik.http.routers.gitlab.tls.certresolver=letsencrypt
- traefik.http.services.gitlab.loadbalancer.server.port=80
networks:
- traefik-proxy
# ✅ Fixed logging configuration (moved inside the service)
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
volumes:
gitlab-config:
gitlab-logs:
gitlab-data:
networks:
traefik-proxy:
external: true