Hey Community,
i am pretty new to gitlab as well as docker. I tried to follow a few tutorials but had no success.
My Goal: Set up Gitlab locally, without a domain and without a proper hostname. Only an ip address.
Host: Virtualized Ubuntu Server 20.4
Virtualization: VMWare Player
Docker-Concept: docker-compose
What did i do:
setup the environment in an .env file - gitlab home is located at:
/home/docker_persistent/gitlab
I set up a docker-compose.yaml:
gitlab:
container_name: ‘gitlab’
image: ‘gitlab/gitlab-ce:latest’
restart: always
hostname: ‘gitlab’
environment:
GITLAB_OMNIBUS_CONFIG: |
# Add any other gitlab.rb configuration here, each on its own line
#external_url 'https://127.0.0.1'
gitlab_rails['gitlab_shell_ssh_port'] = 22
#nginx['redirect_http_to_https'] = true
#registry_nginx['redirect_http_to_https'] = true
#mattermost_nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.pem"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparam.pem"
ports:
- '8080:80'
- '8433:433'
- '8022:22'
volumes:
- '${GITLAB_HOME}/config:/etc/gitlab'
- '${GITLAB_HOME}/logs:/var/log/gitlab'
- '${GITLAB_HOME}/data:/var/opt/gitlab'
- '${GITLAB_HOME}/config/ssl:/etc/gitlab/ssl'
Than i opened the appropriate ports:
ufw allow 8433
ufw allow 8022
ufw allow 8080
I created a self-signed certificate as well as the dhparams file and copied those files to the appropriate directories.
When i start the container using docker-compose up i do not see any issues - i can connect to my gitlab instance using ip:8080 but i can not reach it under ip:8433
I tried to reach the instance using curl -k ip:8433 the result is
connection refused
I probably missed a step, but i cannot find out which one.
Is there additional information that I should provide?
Regards
Flo
[Edit]:
I checked that the port is open using netcat - that seems to work just fine.