User Tools

Site Tools


os:linux:debian:docker

This is an old revision of the document!


Docker && Gitlab && subdomain && ssl

# Install everything:
apt-get install apache2 docker docker-compose python-certbot python-certbot-apache
docker-compose.yml
web:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: 'gitlab.hostname.de'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.hostname.de:8443'
      # Add any other gitlab.rb configuration here, each on its own line
  ports:
    - '8443:8443'
    - '22:22'
  volumes:
    - '/srv/gitlab/config:/etc/gitlab'
    - '/srv/gitlab/logs:/var/log/gitlab'
    - '/srv/gitlab/data:/var/opt/gitlab'
# launch container:
docker-compose up
 
# install certificate and add subdomain
certbot --apache
certbot certonly --apache --expand -d hostname.de -d gitlab.hostname.de
 
# rework and copy certificate into gitlab data storage:
cd /etc/letsencrypt/live/hostname.de
cat cert.pem fullchain.crt > gitlab.hostname.de.crt  
cp privkey.pem gitlab.hostname.de.key  
mv gitlab.* /srv/gitlab/config/ssl
os/linux/debian/docker.1512655776.txt.gz · Last modified: 2017/12/07 15:09 by ebaer

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki