diff options
author | Sytse Sijbrandij <sytses@gmail.com> | 2014-12-03 14:41:47 +0300 |
---|---|---|
committer | Sytse Sijbrandij <sytses@gmail.com> | 2014-12-03 14:41:47 +0300 |
commit | 9e4d39c0513fc91fc2c844d482e82a8e9df8927d (patch) | |
tree | 0bb0120a4f45b2cf6347377fd0b94664501f910b /docker/troubleshooting.md | |
parent | ed7760b1d7b58d07793437db78f960ed7c4ae182 (diff) |
Move commands to the readme, rename gitlab to gitlab_app, add PostgreSQL tweaks to gitlab.rb.
Diffstat (limited to 'docker/troubleshooting.md')
-rw-r--r-- | docker/troubleshooting.md | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/docker/troubleshooting.md b/docker/troubleshooting.md index 442cc69ec58..b1b70de5997 100644 --- a/docker/troubleshooting.md +++ b/docker/troubleshooting.md @@ -11,20 +11,22 @@ postgresql['log_directory'] = '/var/log/gitlab/postgresql' ```bash sudo docker build --tag gitlab_image docker/ -sudo docker rm -f gitlab +sudo docker rm -f gitlab_app sudo docker rm -f gitlab_data sudo docker run --name gitlab_data gitlab_image /bin/true sudo docker run -ti --rm --volumes-from gitlab_data ubuntu apt-get update && sudo apt-get install -y vim && sudo vim /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 --detach --name gitlab_app --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 tail -f /var/log/gitlab/postgresql/current -sudo docker run -ti --rm --volumes-from gitlab_data ubuntu /bin/sh +sudo docker run -t --rm --volumes-from gitlab_data ubuntu cat /var/opt/gitlab/postgresql/data/postgresql.conf | grep shared_buffers + +sudo docker run -t --rm --volumes-from gitlab_data ubuntu cat /etc/gitlab/gitlab.rb ``` # Interactively @@ -35,21 +37,27 @@ sudo docker run -ti --rm --volumes-from gitlab_data ubuntu /bin/sh # - we run interactively (-t -i) # - we define TERM=linux because it allows to use arrow keys in vi (!!!) # - we choose another startup command (bash) -sudo docker run -ti -e TERM=linux --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image bash +sudo docker run -ti -e TERM=linux --name gitlab_app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image bash # Configure GitLab to redirect PostgreSQL logs echo "postgresql['log_directory'] = '/var/log/gitlab/postgresql'" >> /etc/gitlab/gitlab.rb # Prevent Postgres from allocating 25% of total memory -echo "postgresql['shared_buffers'] = '100MB'" >> /etc/gitlab/gitlab.rb +echo "postgresql['shared_buffers'] = '1MB'" >> /etc/gitlab/gitlab.rb # You can now start GitLab manually from Bash (in the background) # Maybe the command below is still missing something to run in the background gitlab-ctl reconfigure > /var/log/gitlab/reconfigure.log & /opt/gitlab/embedded/bin/runsvdir-start & +# Inspect PostgreSQL config +cat /var/opt/gitlab/postgresql/data/postgresql.conf | grep shared_buffers + # And tail the logs (PostgreSQL log may not exist immediately) tail -f /var/log/gitlab/reconfigure.log /var/log/gitlab/postgresql/current # And get the memory cat /proc/meminfo +head /proc/sys/kernel/shmmax /proc/sys/kernel/shmall +free -m + ``` |