Comments (5)
Maybe you are on wrong repo to ask such question.
You may need to search it on hub.docker.com : https://hub.docker.com/_/postgres/tags?page=&page_size=&ordering=&name=15.1
from docker-gitlab.
We have previously used Sameersbn/postgresql:laster to pull the image version. Enter the container to view the version: postgres (PostgreSQL) 15.1 (Debian 15.1-1.pgdg110+1)
from docker-gitlab.
By using postgres:15.1
, you can get 15.1 (Debian 15.1-1.pgdg110+1). What is exact progrem for you?
$ docker run --rm postgres:15.1 psql --version
psql (PostgreSQL) 15.1 (Debian 15.1-1.pgdg110+1)
The image, sameersbn/postgresql
is available on hub.docker.com: https://hub.docker.com/r/sameersbn/postgresql/tags
You can use sameersbn/postgresql:latest
as well.
Current sameersbn/postgresql:latest
tag is mostly same as sameersbn/postgresql:15-20230628
which provides psql (PostgreSQL) 15.3 (Ubuntu 15.3-1.pgdg22.04+1)
but may works as well.
$ docker run -it --rm sameersbn/postgresql:latest sh -c "/sbin/entrypoint.sh 2>/dev/null & sleep 5; psql --version;"
Initializing datadir...
Initializing certdir...
Initializing logdir...
Initializing rundir...
Setting resolv.conf ACLs...
Initializing database...
Configuring hot standby...
‣ Setting postgresql.conf parameter: wal_level = 'hot_standby'
‣ Setting postgresql.conf parameter: max_wal_senders = '16'
‣ Setting postgresql.conf parameter: checkpoint_segments = '8'
‣ Setting postgresql.conf parameter: wal_keep_segments = '32'
‣ Setting postgresql.conf parameter: hot_standby = 'on'
‣ Setting postgresql.conf parameter: data_directory = '/var/lib/postgresql/15/main'
‣ Setting postgresql.conf parameter: log_directory = '/var/log/postgresql'
‣ Setting postgresql.conf parameter: log_filename = 'postgresql-15-main.log'
‣ Setting postgresql.conf parameter: ssl = 'off'
Starting PostgreSQL 15...
psql (PostgreSQL) 15.3 (Ubuntu 15.3-1.pgdg22.04+1)
Note that it is not the topic of questions to ask here.
from docker-gitlab.
The previous docker-compose.yml configuration file image specified the gitlab version as image: sameersbn/gitlab:latest, sameersbn/postgresql:latest. The postgresql version downloaded at that time was postgres (PostgreSQL) 15.1 (Debian 15.1-1.pgdg110+1), gitlab The downloaded image version at that time was gitlab:15.7.0. If docker-compose.yml specified the postgresql version as postgres:15.1, the postgres container would not start. Now I want to upgrade gitlab to the latest version
postgresql:
restart: always
#image: sameersbn/postgresql:15-20230628
image: sameersbn/postgresql:latest
#image: postgres:15.1
#image: sameersbn/postgresql:12-20200524
volumes:
- ./postgresql-data:/var/lib/postgresql
environment:
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm,btree_gist
gitlab:
restart: always
#image: sameersbn/gitlab:15.7.0
image: sameersbn/gitlab:latest
depends_on:
- redis
- postgresql
ports:
- "10443:443"
from docker-gitlab.
OK your problem is to upgrade from sameersbn/gitlab:15.7.0 to sameersbn/gitlab:latest (currently it is sameersbn/gitlab:17.0.0), right?
You cannot upgrade from 15.7.0 to 17.0.0 directly. You need to relay several versions and wait for the background migration to complete on each relayed version. See https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/?current=15.7.0&distro=docker&edition=ce and check the versions you have to relay.
Note that some versions are missing for sameersbn/gitlab
. You can use previous minor release (16.1.5 instead of 16.1.6, for example). See #2938 (comment) for more details.
For postgresql: I have never tested but I heard there are some issue running gitlab with postgresql 15.x. See #2859 for example.
Except this concern, you should be able to use sameersbn/postgresql:15-20230628
.
I just tested the combination of postgresql 15.x and gitlab 17.0.0 by following step:
-
Use copy of
docker-compose.yml
from this repository. They usesameersbn/gitlab:17.0.0
,sameersbn/postgresql:14-20230628
andredis:6.2
. -
docker compose up -d
: images will be pulled if not exists -
Wait for a while
-
Open GitLab Web UI, check versions in admin dashboard (that waspostgresql 14.8)
-
docke compose down
-
edit docker-compose.yml to use
sameersbn/postgresql:15-20230628
-
docker compose up -d postgresql
: launch only postgresql to perform migration from 14.x to 15.x (this is special feature provided thatsameersbn/postgresql
provides)here is a log: Initializing datadir... Initializing certdir... Initializing logdir... Initializing rundir... Setting resolv.conf ACLs... Initializing database... ‣ Migrating PostgreSQL 14 data to 15... ‣ Installing PostgreSQL 14... W: http://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. debconf: delaying package configuration, since apt-utils is not installed ‣ Migration in progress. Please be patient...Performing Consistency Checks ----------------------------- Checking cluster versions ok Checking database user is the install user ok Checking database connection settings ok Checking for prepared transactions ok Checking for system-defined composite types in user tables ok Checking for reg* data types in user tables ok Checking for contrib/isn with bigint-passing mismatch ok Creating dump of global objects ok Creating dump of database schemas ok Checking for presence of required libraries ok Checking database user is the install user ok Checking for prepared transactions ok Checking for new cluster tablespace directories ok If pg_upgrade fails after this point, you must re-initdb the new cluster before continuing. Performing Upgrade ------------------ Analyzing all rows in the new cluster ok Freezing all rows in the new cluster ok Deleting files from new pg_xact ok Copying old pg_xact to new server ok Setting oldest XID for new cluster ok Setting next transaction ID and epoch for new cluster ok Deleting files from new pg_multixact/offsets ok Copying old pg_multixact/offsets to new server ok Deleting files from new pg_multixact/members ok Copying old pg_multixact/members to new server ok Setting next multixact ID and offset for new cluster ok Resetting WAL archives ok Setting frozenxid and minmxid counters in new cluster ok Restoring global objects in the new cluster ok Restoring database schemas in the new cluster ok Copying user relation files ok Setting next OID for new cluster ok Sync data directory to disk ok Creating script to delete old cluster ok Checking for extension updates notice Your installation contains extensions that should be updated with the ALTER EXTENSION command. The file update_extensions.sql when executed by psql by the database superuser will update these extensions. Upgrade Complete ---------------- Optimizer statistics are not transferred by pg_upgrade. Once you start the new server, consider running: /usr/lib/postgresql/15/bin/vacuumdb --all --analyze-in-stages Running this script will delete the old cluster's data files: ./delete_old_cluster.sh Configuring hot standby... ‣ Setting postgresql.conf parameter: wal_level = 'hot_standby' ‣ Setting postgresql.conf parameter: max_wal_senders = '16' ‣ Setting postgresql.conf parameter: checkpoint_segments = '8' ‣ Setting postgresql.conf parameter: wal_keep_segments = '32' ‣ Setting postgresql.conf parameter: hot_standby = 'on' ‣ Setting postgresql.conf parameter: data_directory = '/var/lib/postgresql/15/main' ‣ Setting postgresql.conf parameter: log_directory = '/var/log/postgresql' ‣ Setting postgresql.conf parameter: log_filename = 'postgresql-15-main.log' ‣ Setting postgresql.conf parameter: ssl = 'off' Creating database user: gitlab Creating database: gitlabhq_production... ‣ Loading pg_trgm extension... ‣ Loading btree_gist extension... ‣ Granting access to gitlab user... Starting PostgreSQL 15... 2024-05-22 10:55:38.561 UTC [1] LOG: starting PostgreSQL 15.3 (Ubuntu 15.3-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, 64-bit 2024-05-22 10:55:38.561 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-05-22 10:55:38.561 UTC [1] LOG: listening on IPv6 address "::", port 5432 2024-05-22 10:55:38.570 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-05-22 10:55:38.593 UTC [2534] LOG: database system was shut down at 2024-05-22 10:55:38 UTC 2024-05-22 10:55:38.616 UTC [1] LOG: database system is ready to accept connections
-
docker compose up -d
to launch redis and gitlab -
Wait for a while
-
Open GitLab Web UI and check admin dashboard : the version of postgresql should be upgrade (15.3)
Both worked fine for me, whether gitlab was completely new or restored from backups from several years of production.
I have never faced issue (because I have never tested) but I think it's safer to update gitlab to the latest version possible and then update postgresql.
Good luck.
from docker-gitlab.
Related Issues (20)
- ENOENT: No such file or directory HOT 4
- problem deleting image or tag 16.6.1 HOT 13
- 16.7.0: Rake aborts launch with "failed to get urandom" HOT 36
- Migrate gitlab 11.10.4 to gitlab 16.6.2 with mysql to postgresql
- Error fetching repo data HOT 1
- CVE-2023-7028 HOT 3
- Upgrade Ruby to 3.2.x to remove bug introduced on Ruby 3.1.x HOT 4
- Unable to fetch commit when using --depth 1 mode
- GitLab Critical Security Release: 16.8.1, 16.7.4, 16.6.6, 16.5.8 HOT 1
- How to backup GitLab in Kubernetes? Do you have any good ideas, templates, or documentation? I'm not very familiar with Kubernetes, so please help me. HOT 2
- Backups not functioning in v16.8.1 HOT 3
- [Question] How to change the clone link from localhost to my domain? HOT 2
- Support setting `global_time_tracking_report` HOT 1
- I have set up an auto-backup strategy in Kubernetes, but it seems not to take effect. How can I troubleshoot the problem? HOT 9
- How is openid_connect_signing_key handled? HOT 1
- level=error correlation_id= duration_ms=0 error="badgateway: failed to receive response: dial unix /home/git/gitlab/tmp/sockets/gitlab.socket: connect: no such file or directory
- Please support pages namespace_in_path
- Web log-in broken HOT 2
- missing 16.1.6 and 16.3.7 version needed for upgrade path HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-gitlab.