Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade instructions from Postgresql 12 to 14 #2854

Merged
merged 2 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

orbs:
shellcheck: circleci/[email protected]
docker: circleci/docker@2.1.1
docker: circleci/docker@2.4.0
go: circleci/[email protected]

commands:
Expand Down Expand Up @@ -231,6 +231,9 @@ jobs:
- run:
name: Wait for stack bootup
command: sleep 90
- run:
name: Show logs
command: docker-compose logs
- run:
name: Test image bootup
command: |
Expand Down
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#L21>).
>
> 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