use docker
export GITLAB_HOME=/vol2/gitlab2/apollo
docker run --detach \
--hostname HOSTNAME \
--publish 11000:443 --publish 11001:80 --publish 11002:22 \
--name apollo \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ee:latest
use docker-compose
vim docker-compose.yml
version: '3.6'
services:
web:
image: gitlab/gitlab-ee
container_name: gitlab
restart: always
hostname: 192.168.242.66 # Change to your domain or IP
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.242.66:11000' # Change to your domain or IP
letsencrypt['enable'] = false
network_mode: bridge # Set network mode to bridge
ports:
- "11000:80" # HTTP
- "11001:443" # HTTPS
- "11002:22" # SSH
volumes:
- gitlab-config:/vol2/gitlab2/config
- gitlab-log:/vol2/gitlab2/log
- gitlab-data:/vol2/gitlab2/data
tmpfs:
- /vol2/gitlab2/shm:size=2g
volumes:
gitlab-config:
gitlab-log:
gitlab-data:
docker-compose up -d
note:
i succeed in docker
but don't in docker-compose