Skip to content

Commit

Permalink
Temporary remove geo from config/database.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sachilles committed Jul 2, 2022
1 parent 4c57691 commit 5c9c5ca
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 1 deletion.
100 changes: 100 additions & 0 deletions assets/build/config/database.yml.postgresql
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# HINT: This file is identical to the corresponding configuration file from the
# upstream repository, where the additional defined entries for `geo` had to be
# removed. Otherwise, it is not possible to build the image, since the build
# will fail with the error message:
#
# > rake aborted!
# > ERROR: This installation of GitLab uses unsupported database names in 'config/database.yml': geo. The only supported ones are main, ci.
#
# This adjustment is hopefully only a temporary workaround (see
# <https://github.com/sameersbn/docker-gitlab/pull/2596>).

#
# PRODUCTION
#
production:
main:
adapter: postgresql
encoding: unicode
database: gitlabhq_production
username: git
password: "secure password"
host: localhost
# load_balancing:
# hosts:
# - host1.example.com
# - host2.example.com
# discover:
# nameserver: 1.2.3.4
# port: 8600
# record: secondary.postgresql.service.consul
# interval: 300
# geo:
# adapter: postgresql
# encoding: unicode
# database: gitlabhq_geo_production
# username: git
# password: "secure password"
# host: localhost

#
# Development specific
#
development:
main:
adapter: postgresql
encoding: unicode
database: gitlabhq_development
username: postgres
password: "secure password"
host: localhost
variables:
statement_timeout: 15s
# geo:
# adapter: postgresql
# encoding: unicode
# database: gitlabhq_geo_development
# username: postgres
# password: "secure password"
# host: localhost

#
# Staging specific
#
staging:
main:
adapter: postgresql
encoding: unicode
database: gitlabhq_staging
username: git
password: "secure password"
host: localhost
# geo:
# adapter: postgresql
# encoding: unicode
# database: gitlabhq_geo_staging
# username: git
# password: "secure password"
# host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
main:
adapter: postgresql
encoding: unicode
database: gitlabhq_test
username: postgres
password:
host: localhost
prepared_statements: false
variables:
statement_timeout: 15s
# geo:
# adapter: postgresql
# encoding: unicode
# database: gitlabhq_geo_test
# username: postgres
# password:
# host: localhost
6 changes: 5 additions & 1 deletion assets/build/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ chown -R ${GITLAB_USER}: ${GITLAB_HOME}
# gitlab.yml and database.yml are required for `assets:precompile`
exec_as_git cp ${GITLAB_INSTALL_DIR}/config/resque.yml.example ${GITLAB_INSTALL_DIR}/config/resque.yml
exec_as_git cp ${GITLAB_INSTALL_DIR}/config/gitlab.yml.example ${GITLAB_INSTALL_DIR}/config/gitlab.yml
exec_as_git cp ${GITLAB_INSTALL_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml
#
# Temporary workaround, see <https://github.com/sameersbn/docker-gitlab/pull/2596>
#
# exec_as_git cp ${GITLAB_INSTALL_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml
exec_as_git cp ${GITLAB_BUILD_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml

# Installs nodejs packages required to compile webpack
exec_as_git yarn install --production --pure-lockfile
Expand Down

0 comments on commit 5c9c5ca

Please sign in to comment.