diff --git a/roles/docker-gitlab/templates/docker-compose.yml.j2 b/roles/docker-gitlab/templates/docker-compose.yml.j2 index 2755c3f4..8957484b 100644 --- a/roles/docker-gitlab/templates/docker-compose.yml.j2 +++ b/roles/docker-gitlab/templates/docker-compose.yml.j2 @@ -19,6 +19,8 @@ services: nginx['listen_port'] = 80 nginx['listen_https'] = false + gitlab_rails['initial_root_password'] = "{{gitlab_initial_root_password}}" + #redis['enable'] = false #gitlab_rails['redis_host'] = 'redis' #gitlab_rails['redis_port'] = '6379' @@ -30,6 +32,9 @@ services: - 'logs:/var/log/gitlab' - 'data:/var/opt/gitlab' shm_size: '256m' + depends_on: + database: + condition: service_healthy {% include 'templates/docker-postgres-service.yml.j2' %} diff --git a/roles/docker-gitlab/vars/main.yml b/roles/docker-gitlab/vars/main.yml index 7d748bad..3961d796 100644 --- a/roles/docker-gitlab/vars/main.yml +++ b/roles/docker-gitlab/vars/main.yml @@ -1,7 +1,7 @@ docker_compose_instance_directory: "{{path_docker_compose_instances}}gitlab/" database_instance: "gitlab" database_host: "database" -database_databasename: "gitlabhq_production" +database_databasename: "gitlab" database_username: "gitlab" database_password: "{{gitlab_database_password}}" database_version: "{{ gitlab_database_version | default(postgres_default_version) }}" \ No newline at end of file diff --git a/templates/docker-postgres-service.yml.j2 b/templates/docker-postgres-service.yml.j2 index 808997a4..46ac6dec 100644 --- a/templates/docker-postgres-service.yml.j2 +++ b/templates/docker-postgres-service.yml.j2 @@ -7,7 +7,7 @@ - POSTGRES_DB={{database_databasename}} restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "pg_isready -U {{database_username}}"] + test: ["CMD-SHELL", "pg_isready -U {{database_databasename}}"] interval: 10s timeout: 5s retries: 6