Add troubleshooting section to the docker documentation.

This commit is contained in:
Sytse Sijbrandij 2014-12-02 15:19:43 +01:00
parent ba955fe174
commit 0afa07f7f0
3 changed files with 32 additions and 5 deletions

View File

@ -4,7 +4,6 @@
# sudo docker build --tag gitlab_image docker/
# sudo docker run --name gitlab_data gitlab_image /bin/true
# sudo docker run --detach --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image
# sudo docker run -t --rm --volumes-from gitlab_data ubuntu tail -f /var/log/gitlab/reconfigure.log
FROM ubuntu:14.04
MAINTAINER Vincent Robert <vincent.robert@genezys.net>
@ -12,8 +11,9 @@ MAINTAINER Vincent Robert <vincent.robert@genezys.net>
# Install required packages
RUN apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy \
openssh-server \
wget \
openssh-server \
wget \
vim \
&& apt-get clean
# Download & Install GitLab

View File

@ -8,7 +8,7 @@ GitLab offers git repository management, code reviews, issue tracking, activity
![GitLab Logo](https://gitlab.com/uploads/appearance/logo/1/brand_logo-c37eb221b456bb4b472cc1084480991f.png)
How to use this image.
How to use this image
======================
I recommend creating a data volume container first, this will simplify migrations and backups:
@ -28,7 +28,7 @@ Then run GitLab:
You can then go to `http://localhost:8080/` (or most likely `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `docker start gitlab` and `docker stop gitlab`.
How to configure GitLab.
How to configure GitLab
========================
This container uses the official Omnibus GitLab distribution, so all configuration is done in the unique configuration file `/etc/gitlab/gitlab.rb`.
@ -40,3 +40,7 @@ To access GitLab configuration, you can start a new container using the shared d
**Note** that GitLab will reconfigure itself **at each container start.** You will need to restart the container to reconfigure your GitLab.
You can find all available options in [GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration).
Troubleshooting
=========================
Please see the [troubleshooting](troubleshooting.md) file in this directory.

23
docker/troubleshooting.md Normal file
View File

@ -0,0 +1,23 @@
# Troubleshooting
This is to troubleshoot https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/245
But it might contain useful commands for other cases as well.
The configuration to add the postgres log in vim is:
postgresql['log_directory'] = '/var/log/gitlab/postgresql.log'
# Commands
sudo docker rm -f gitlab
sudo docker rm -f gitlab_data
sudo docker build --tag gitlab_image docker/
sudo docker run --name gitlab_data gitlab_image /bin/true
sudo docker run -ti --rm --volumes-from gitlab_data ubuntu apt-get install -y vim; sudo vi /etc/gitlab/gitlab.rb
sudo docker run --detach --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image
sudo docker run -t --rm --volumes-from gitlab_data ubuntu tail -f /var/log/gitlab/reconfigure.log
sudo docker run -t --rm --volumes-from gitlab_data ubuntu cat /var/log/gitlab/postgresql.log