add docker registry to gitlab node

master
TBS093A 2023-03-10 14:10:27 +01:00
parent 562c625aae
commit 75cbc10361
1 changed files with 18 additions and 1 deletions

View File

@ -2,9 +2,22 @@ version: "3.9"
services: services:
docker-registry:
image: registry:2.8.1
container_name: docker-registry
restart: always
environment:
REGISTRY_HTTP_ADDR: 0.0.0.0:80
ports:
- 80
volumes:
- ./volumes/docker-registry:/var/lib/registry
gitlab: gitlab:
image: 'gitlab/gitlab-ee:15.9.2-ee.0' image: 'gitlab/gitlab-ee:15.9.2-ee.0'
container_name: gitlab container_name: gitlab
links:
- docker-registry
restart: always restart: always
hostname: 'localhost' hostname: 'localhost'
environment: environment:
@ -20,6 +33,10 @@ services:
external_url '${GITLAB_IP_OR_DNS}' external_url '${GITLAB_IP_OR_DNS}'
# gitlab_rails['gitlab_https'] = true # gitlab_rails['gitlab_https'] = true
# gitlab_rails['gitlab_port'] = 443 # gitlab_rails['gitlab_port'] = 443
# container registry setup
registry_external_url 'http://docker-registry/'
ports: ports:
- 0.0.0.0:80:80 - 0.0.0.0:80:80
- 0.0.0.0:443:443 - 0.0.0.0:443:443
@ -29,7 +46,7 @@ services:
- ./volumes/gitlab/data:/var/opt/gitlab - ./volumes/gitlab/data:/var/opt/gitlab
# - ./volumes/gitlab/logs:/var/log/gitlab # - ./volumes/gitlab/logs:/var/log/gitlab
shm_size: '256m' shm_size: '256m'
gitlab-runner-000: gitlab-runner-000:
image: gitlab/gitlab-runner:alpine3.14-bleeding image: gitlab/gitlab-runner:alpine3.14-bleeding