A little bit more than one year ago, I started playing with Docker. I now run almost all server applications I use in containers: two Drupal web servers, a phpBB forum, a reverse proxy, a DNS server, a MineOS server for my son, etc. I have had the opportunity to investigate how to handle various requirements: data persistence, application update, microservice architecture, service dependency, etc. But I still consider myself as a naive beginner: the applications I have dockerized are for my personal use only. Consequently I've never been exposed to real-life constraints (large number of connections, security, high availability, etc.)
From time to time, I'm asked by some friends to help them, in my field of expertise, to solve some issues they face or to rapidly develop proofs of concept. Deliverables are source code and possibly some electronic schematics. Until recently, I have used email and file transfer to deliver those elements. And I have used a private version control system. Some weeks ago, I decided to spend some time in checking whether a dockerized GitLab could be a good solution to replace my archaic way of handling and sharing source code and schematics.
After some tests, I got the answer: yes! This article describes the few steps I followed to set up my configuration.
Detailed reference documentation is available. Adhering to it:
$ sudo docker run --detach \
--hostname <hostName> \
--env VIRTUAL_HOST=<FQDN> \
--publish <publicPort>:80 \
--name gitlab \
--restart always \
--volume /var/www/runninggitlab/config:/etc/gitlab \
--volume /var/www/runninggitlab/logs:/var/log/gitlab \
--volume /var/www/runninggitlab/data:/var/opt/gitlab \
A few words of explanation:
Now that the container is started:
gitlab_rails['gitlab_email_from'] = '<fromEmail>'
gitlab_rails['gitlab_email_reply_to'] = '<replyToEmail>'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "<SMTPServerAddress>"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "<SMTPUserName>"
gitlab_rails['smtp_password'] = "<SMTPPassword>"
gitlab_rails['smtp_domain'] = "<SMTPDomain>"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
To backup GitLab data, enter the container, and run the backup command:
$ sudo docker exec -it gitlab bash
# gitlab-rake gitlab:backup:create
Backup file is created in /var/www/runninggitlab/data/backups/ on the host system.
I'll soon automatize backup process. Stay tuned...
Refer to related documentation. I followed it this morning, without any trouble.
Check this article.
 For 25 years, I've developed systems in the field of what is today named IoT or M2M. My main expertise relates to designing and implementing (application-level) communication between connected objects and a central application. This encompasses bare-metal embedded software development, application-level protocol design and implementation, interfacing with various communication modules, some digital electronics, etc. Overall system-architecture design is part of my expertise as well.