Skip to content

Commit

Permalink
Upgrade instructions form Postgresql 12 to 14
Browse files Browse the repository at this point in the history
Postgres 15 has a permissions problem.
See sameersbn/docker-postgresql#168
  • Loading branch information
froque committed Nov 4, 2023
1 parent 53d1ab4 commit 94231a0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ docker run --name gitlab-postgresql -d \
--env 'DB_USER=gitlab' --env 'DB_PASS=password' \
--env 'DB_EXTENSION=pg_trgm,btree_gist' \
--volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
sameersbn/postgresql:12-20200524
sameersbn/postgresql:14-20230628
```

Step 2. Launch a redis container
Expand Down Expand Up @@ -236,7 +236,7 @@ docker run --name gitlab -d \

GitLab uses a database backend to store its data. You can configure this image to use PostgreSQL.

*Note:* GitLab requieres PostgreSQL now. So use an older image < 12.1 or migrate to PostgresSQL
*Note:* GitLab requires PostgreSQL now. So use an older image < 12.1 or migrate to PostgresSQL

#### PostgreSQL

Expand All @@ -263,7 +263,7 @@ Please note furthermore, that only compatible versions of the `postgresql-client
- `postgresql-client-14`,
- and `postgresql-client-15`.

*NOTE:* version 13.7.0 and later requires PostgreSQL version 12.x
*NOTE:* Version 13.7.0 and later requires PostgreSQL version 12.x. Version 16.0.0 and later requires PostgreSQL version 13.x

##### External PostgreSQL Server

Expand Down Expand Up @@ -301,7 +301,7 @@ To illustrate linking with a postgresql container, we will use the [sameersbn/po
First, lets pull the postgresql image from the docker index.

```bash
docker pull sameersbn/postgresql:12-20200524
docker pull sameersbn/postgresql:14-20230628
```

For data persistence lets create a store for the postgresql and start the container.
Expand All @@ -321,7 +321,7 @@ docker run --name gitlab-postgresql -d \
--env 'DB_USER=gitlab' --env 'DB_PASS=password' \
--env 'DB_EXTENSION=pg_trgm' \
--volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
sameersbn/postgresql:12-20200524
sameersbn/postgresql:14-20230628
```

The above command will create a database named `gitlabhq_production` and also create a user named `gitlab` with the password `password` with access to the `gitlabhq_production` database.
Expand Down Expand Up @@ -2630,9 +2630,9 @@ Usage when using `docker-compose` can also be found there.
>
> Since GitLab release `8.6.0` PostgreSQL users should enable `pg_trgm` extension on the GitLab database. Refer to GitLab's [Postgresql Requirements](http://doc.gitlab.com/ce/install/requirements.html#postgresql-requirements) for more information
>
> If you're using `sameersbn/postgresql` then please upgrade to `sameersbn/postgresql:12-20200524` or later and add `DB_EXTENSION=pg_trgm,btree_gist` to the environment of the PostgreSQL container (see: <https://github.com/sameersbn/docker-gitlab/blob/master/docker-compose.yml#L8>).
> If you're using `sameersbn/postgresql` then please upgrade to `sameersbn/postgresql:14-20230628` or later and add `DB_EXTENSION=pg_trgm,btree_gist` to the environment of the PostgreSQL container (see: <https://github.com/sameersbn/docker-gitlab/blob/master/docker-compose.yml#L8>).
>
> As of version 13.7.0, the required PostgreSQL is version 12.x. If you're using PostgreSQL image other than the above, please review section [Upgrading PostgreSQL](#upgrading-postgresql).
> As of version 13.7.0, the required PostgreSQL is version 12.x. As of version 16.0.0, the required PostgreSQL is version 13.x. If you're using PostgreSQL image other than the above, please review section [Upgrading PostgreSQL](#upgrading-postgresql).

GitLabHQ releases new versions on the 22nd of every month, bugfix releases immediately follow. I update this project almost immediately when a release is made (at least it has been the case so far). If you are using the image in production environments I recommend that you delay updates by a couple of days after the gitlab release, allowing some time for the dust to settle down.

Expand Down
2 changes: 1 addition & 1 deletion contrib/docker-swarm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:

postgresql:
restart: always
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
volumes:
- /srv/docker/gitlab/postgresql:/var/lib/postgresql:Z
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- node.labels.gitlab.redis-data == true

postgresql:
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
volumes:
- postgresql-data:/var/lib/postgresql:Z
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:

postgresql:
restart: always
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
volumes:
- postgresql-data:/var/lib/postgresql:Z
environment:
Expand Down
2 changes: 1 addition & 1 deletion docs/docker-compose-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:

postgresql:
restart: always
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
volumes:
- postgresql-data:/var/lib/postgresql:Z
environment:
Expand Down
2 changes: 1 addition & 1 deletion docs/docker-compose-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:

postgresql:
restart: always
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
volumes:
- postgresql:/var/lib/postgresql:Z
environment:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/postgresql-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: postgresql
image: sameersbn/postgresql:12-20200524
image: sameersbn/postgresql:14-20230628
env:
- name: DB_USER
value: gitlab
Expand Down

0 comments on commit 94231a0

Please sign in to comment.