-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
70 lines (64 loc) · 3.46 KB
/
Dockerfile-dev
File metadata and controls
70 lines (64 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# https://gitlab.com/gitlab-org/omnibus-gitlab/-/tree/master/docker
FROM registry.gitlab.com/systemkern/gitlab-ce-turnkey:latest
MAINTAINER Systemkern
# Edit the Postgres configuration to be able external access to the Database
# The original line in PGCONF_TEMP is
# listen_addresses = '<%= @listen_address %>' # what IP address(es) to listen on;
# The original line in PGCONF is
ENV PGCONF_TEMP /opt/gitlab/embedded/cookbooks/postgresql/templates/default/postgresql.conf.erb
ENV PGCONF /opt/gitlab/etc/gitlab.rb.template
RUN sed -i "s/<%= @listen_address %>/*/g" ${PGCONF_TEMP} && \
sed -i "s/#.*postgresql.*trust_auth_cidr_addresses.*/postgresql\['trust_auth_cidr_addresses'\] = \[\"0\.0\.0\.0\/0\"\]/g" ${PGCONF}
# Expose postgres
EXPOSE 5432
### Verify Db connection from outside of container
#```
#$ psql -p 5432 -h localhost -U gitlab-psql postgres
#psql (11.7 (Ubuntu 11.7-2.pgdg16.04+1), server 10.12)
#SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
#Type "help" for help.
#postgres=# \l
# List of databases
# Name | Owner | Encoding | Collate | Ctype | Access privileges
#---------------------+-------------+----------+---------+---------+---------------------------------
# gitlabhq_production | gitlab | UTF8 | C.UTF-8 | C.UTF-8 |
# postgres | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 |
# template0 | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | =c/"gitlab-psql" +
# | | | | | "gitlab-psql"=CTc/"gitlab-psql"
# template1 | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | =c/"gitlab-psql" +
# | | | | | "gitlab-psql"=CTc/"gitlab-psql"
# db_name | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | =Tc/"gitlab-psql" +
# | | | | | "gitlab-psql"=CTc/"gitlab-psql"+
# | | | | | test_user=CTc/"gitlab-psql"
#(5 rows)
#
#postgres=# \du+
# List of roles
# Role name | Attributes | Member of | Description
#-------------------+------------------------------------------------------------+-----------+-------------
# gitlab | | {} |
# gitlab-psql | Superuser, Create role, Create DB, Replication, Bypass RLS | {} |
# gitlab_replicator | Replication | {} |
# db_user | Create DB | {} |
#
#
#postgres=# show data_directory;
# data_directory
#---------------------------------
# /var/opt/gitlab/postgresql/data
#(1 row)
#
#postgres=# select version();
# version
#------------------------------------------------------------------------------------------------------------------
# PostgreSQL 10.12 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609, 64-bit
#(1 row)
#
#postgres=#
#```
#
#Known Issues
#--------------------
#1. The postgres password has to be configured in two places
# * As an environment variable for the postgresql script
# * In the Gitlab Configuration