Skip to content

Instantly share code, notes, and snippets.

@llucasshenrique
Created August 30, 2019 02:33
Show Gist options
  • Save llucasshenrique/9d2d4f82e3cc9c5fac25523637ee3569 to your computer and use it in GitHub Desktop.
Save llucasshenrique/9d2d4f82e3cc9c5fac25523637ee3569 to your computer and use it in GitHub Desktop.
Gitlab numa tacada só
GITLAB_HOSTNAME=gitlab.meudns.com.br
GITLAB_EXTERNAL_URL=http://gitlab.meudns.com.br
# referencia ao container do gitlab
CI_SERVER_URL=http://gitlab
REGISTRATION_TOKEN=5mLV42axOkD6GqGE8kWFjCCUebMG0xnJ
gitlab:
container_name: gitlab
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: $GITLAB_HOSTNAME
# ports:
# - '80:80'
# - '443:443'
# - '422:22'
# - '4567:4567'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
- './gitlab/gitlab.rb:/etc/gitlab/gitlab.rb'
runner-1:
restart: always
depends_on:
- gitlab
container_name: 'gitlab-runner-alpine-a'
image: gitlab/gitlab-runner:alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /srv/gitlab-runner/config:/etc/gitlab-runner
command:
- register
- --non-interactive
- --locked=false
- --name=local-runner
- --executor=docker
environment:
- CI_SERVER_URL: $CI_SERVER_URL
- REGISTRATION_TOKEN: $REGISTRATION_TOKEN
external_url 'https://gitlab.meudns.com.br/'
gitlab_rails['initial_shared_runners_registration_token'] = "5mLV42axOkD6GqGE8kWFjCCUebMG0xnJ"
## pode ignorar o que estiver abaixo, o que é necessário é apenas que o token inicial seja conhecido
nginx['listen_addresses'] = ['127.0.0.1', '[::1]']
nginx['listen_port'] = 8081
nginx[‘custom_gitlab_server_config’] = “location ^~/.well-known {\n alias /opt/gitlab/embedded/service/gitlab-rails/public/.well-known;\n}\n”
registry_nginx['enable'] = true
registry_nginx['listen_port'] = 4567
registry_external_url 'https://gitlab.meudns.com.br:4567'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment