87 lines
2.9 KiB
YAML
87 lines
2.9 KiB
YAML
services:
|
|
gitlab:
|
|
image: 'gitlab/gitlab-ce:latest'
|
|
container_name: gitlab-server
|
|
restart: always
|
|
networks:
|
|
- gitlab_net
|
|
|
|
environment:
|
|
GITLAB_OMNIBUS_CONFIG: |
|
|
external_url '${GITLAB_EXTERNAL_URL}'
|
|
gitlab_rails['initial_root_password'] = '${GITLAB_ROOT_PASSWORD}'
|
|
|
|
letsencrypt['enable'] = ${LETSENCRYPT_ENABLE}
|
|
letsencrypt['contact_emails'] = ['${GITLAB_ROOT_EMAIL}']
|
|
letsencrypt['auto_renew'] = true
|
|
letsencrypt['auto_renew_hour'] = 0
|
|
letsencrypt['auto_renew_minute'] = 30
|
|
letsencrypt['auto_renew_day_of_month'] = "*/7"
|
|
|
|
gitlab_rails['gitlab_shell_ssh_port'] = ${SSH_PORT}
|
|
|
|
gitlab_rails['smtp_enable'] = true
|
|
gitlab_rails['smtp_address'] = "${SMTP_ADDRESS}"
|
|
gitlab_rails['smtp_port'] = ${SMTP_PORT}
|
|
gitlab_rails['smtp_user_name'] = "${SMTP_USER}"
|
|
gitlab_rails['smtp_password'] = "${SMTP_PASSWORD}"
|
|
gitlab_rails['smtp_domain'] = "${SMTP_DOMAIN}"
|
|
gitlab_rails['smtp_authentication'] = "login"
|
|
gitlab_rails['smtp_enable_starttls_auto'] = true
|
|
gitlab_rails['smtp_tls'] = false
|
|
|
|
gitlab_rails['gitlab_email_from'] = '${SMTP_FROM}'
|
|
gitlab_rails['gitlab_email_reply_to'] = '${SMTP_FROM}'
|
|
|
|
# ==========================================
|
|
# MONITORING & METRICS
|
|
# ==========================================
|
|
prometheus['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
alertmanager['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
gitlab_exporter['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
node_exporter['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
redis_exporter['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
postgres_exporter['enable'] = ${GITLAB_MONITORING_ENABLE}
|
|
|
|
# ==========================================
|
|
# HIGH PERFORMANCE TUNING
|
|
# ==========================================
|
|
puma['worker_processes'] = ${PUMA_WORKERS}
|
|
puma['min_threads'] = ${PUMA_THREADS}
|
|
puma['max_threads'] = ${PUMA_THREADS}
|
|
|
|
sidekiq['max_concurrency'] = ${SIDEKIQ_CONCURRENCY}
|
|
|
|
postgresql['shared_buffers'] = "${POSTGRES_SHARED_BUFFERS}MB"
|
|
postgresql['max_worker_processes'] = ${POSTGRES_WORKERS}
|
|
|
|
ports:
|
|
- '${HTTP_PORT}:80'
|
|
- '${HTTPS_PORT}:443'
|
|
- '${SSH_PORT}:22'
|
|
volumes:
|
|
- '${GITLAB_HOME}/config:/etc/gitlab'
|
|
- '${GITLAB_HOME}/logs:/var/log/gitlab'
|
|
- '${GITLAB_HOME}/data:/var/opt/gitlab'
|
|
|
|
shm_size: '${POSTGRES_SHARED_BUFFERS}m'
|
|
|
|
gitlab-runner:
|
|
image: gitlab/gitlab-runner:latest
|
|
container_name: gitlab-runner
|
|
restart: always
|
|
networks:
|
|
- gitlab_net
|
|
|
|
depends_on:
|
|
- gitlab
|
|
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./runner-config:/etc/gitlab-runner
|
|
|
|
networks:
|
|
gitlab_net:
|
|
name: gitlab_net
|
|
driver: bridge
|