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

Pull upstream changes #7

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
71128b6
Bump metabrainz base-image version to jammy
yvanzo Nov 13, 2023
69ee00c
Align keyrings path with musicbrainz-server repo
yvanzo Nov 13, 2023
4513294
Align loading PGDG keyring with MBS repository
yvanzo Nov 13, 2023
92c3875
Upgrade Node.js version to 20 for musicbrainz
yvanzo Nov 13, 2023
a99d3e2
Avoid reinstalling already installed packages
yvanzo Nov 13, 2023
af1bc36
Upgrade MusicBrainz Server to v-2023-11-13
yvanzo Nov 13, 2023
4a3bbf0
Merge pull request #262 from yvanzo/node-20
yvanzo Nov 13, 2023
9178a23
Update the default download location
yvanzo Nov 27, 2023
4ca4c40
Upgrade MusicBrainz Server to v2023-11-27
yvanzo Nov 27, 2023
7a3ed46
Upgrade MusicBrainz Server to v-2023-12-20
yvanzo Dec 20, 2023
1f0218c
chore: Make redis, postgres and rabbitmq hosts configurable via env v…
lotooo Dec 27, 2023
8af75d2
Amend 1f0218c3: Replace all `db` in recreatedb.sh
yvanzo Jan 2, 2024
7e7d865
Amend 1f0218c3: Replace `redis` in MB dev setup
yvanzo Jan 2, 2024
f6c24a5
Amend 1f0218c3: Replace `db` in MB development setup
yvanzo Jan 2, 2024
d60373c
Amend 1f0218c3: Set hosts in MB development setup
yvanzo Jan 2, 2024
245736d
MBVM-93: Prune the entity cache on replication (#265)
yvanzo Jan 3, 2024
5e368f4
Upgrade MusicBrainz Server to v2024-01-08
yvanzo Jan 8, 2024
76813bb
Document file permissions issue (#266)
yvanzo Jan 9, 2024
4233ed0
docs: Update README to explain the new environment variables to custo…
lotooo Jan 26, 2024
458f1ea
Normalize locale code for Spanish UI localization
yvanzo Jan 11, 2024
b02c61b
Fix building pg_amqp with debian bookworm (#268)
yvanzo Feb 9, 2024
9af3a52
Upgrade MusicBrainz Server to v-2024-02-16
yvanzo Feb 16, 2024
4984957
Upgrade MusicBrainz Server to v-2024-03-11
reosarevok Mar 11, 2024
e1a83a8
Amend 4233ed0c: Fully document customizing backends
yvanzo Mar 21, 2024
82f54d7
Merge pull request #264 from lotooo/master
yvanzo Mar 21, 2024
6585e70
Use the same coding style as in musicbrainz-server
yvanzo Mar 21, 2024
2842913
Install local::lib using cpanm instead of apt-get
yvanzo Mar 21, 2024
cecb58b
Install ts from source instead of using apt-get
yvanzo Mar 21, 2024
eabd479
Install cpanm from source instead of using apt-get
yvanzo Mar 21, 2024
125ec5b
MBS-13358 (I): Upgrade Perl version to 5.38.2
yvanzo Mar 21, 2024
e20ebfb
Merge pull request #273 from yvanzo/perl5dot38-dev
yvanzo Mar 21, 2024
8cc2ad3
Store bash history for musicbrainz development (#272)
yvanzo Mar 22, 2024
ab2d835
Update disk requirements for search indexes
yvanzo Apr 5, 2024
df42495
Upgrade MusicBrainz Server to v-2024-04-09
reosarevok Apr 9, 2024
513b155
Amend 1f0218c3: Restore needed http scheme for SIR
yvanzo Apr 10, 2024
d3b7501
Install local::lib using cpanm instead of apt-get
yvanzo Apr 18, 2024
d185012
Install cpanm from source instead of using apt-get
yvanzo Apr 18, 2024
00c9ba7
MBS-13358 (III): Upgrade Perl version to 5.38.2
yvanzo Apr 18, 2024
98732f4
Install Perl module dependencies with Carton
yvanzo Apr 22, 2024
59da514
Merge pull request #276 from yvanzo/perl5dot38
yvanzo May 8, 2024
6cdbc30
MBS-13361 (mirror): Upgrade to PostgreSQL 16
yvanzo May 8, 2024
817b4df
Hide expected and harmless error message
yvanzo May 14, 2024
22613e3
Fix compiling pg_amqp during Postgres upgrade
yvanzo May 14, 2024
5c13046
Fix showing server version during Postgres upgrade
yvanzo May 14, 2024
0a5b93f
Fix copying Postgres upgrade script to container
yvanzo May 14, 2024
b317d0d
Replace analyze_new_cluster with vacuumdb (PG 14)
yvanzo May 14, 2024
9088f65
Update installed extensions after Postgres upgrade
yvanzo May 14, 2024
631ed97
Pass POSTGRES_VERSION ARG in development setup too
yvanzo May 13, 2024
c253d55
Merge pull request #277 from yvanzo/pg16
yvanzo May 14, 2024
371e419
Upgrade Server to v-2024-05-13-schema-change (#278)
yvanzo May 14, 2024
ab3c0e7
MBVM-42 (1/2): Prebuild musicbrainz service image
yvanzo May 13, 2024
2a495a5
MBVM-42 (2/2): Prebuild db service image
yvanzo May 13, 2024
c8cf077
Bump musicbrainz build sequence to 2
yvanzo May 14, 2024
c7e126e
Merge pull request #279 from yvanzo/prebuild-images
yvanzo May 14, 2024
f362446
Merge branch 'schema-change-2024-q2'
yvanzo May 14, 2024
f6909fc
MBVM-98: Fix enabling mirror website translations
yvanzo Jun 24, 2024
a093084
Upgrade MusicBrainz Server to v-2024-06-24
yvanzo Jun 24, 2024
5a31b7c
Merge pull request #281 from yvanzo/fix-website-lang
yvanzo Jun 24, 2024
15da0c2
Upgrade MusicBrainz Server to v-2024-07-11.0
yvanzo Jul 11, 2024
bcd8213
Upgrade MusicBrainz Server to v-2024-07-22.0
reosarevok Jul 22, 2024
d7f7f90
Upgrade MusicBrainz Server to v-2024-08-12.0
mwiencek Aug 12, 2024
97a7e23
Upgrade MusicBrainz Server to v-2024-09-02
reosarevok Sep 2, 2024
6b19769
Upgrade MusicBrainz Server to v-2024-09-17
reosarevok Sep 17, 2024
76e8832
Upgrade MusicBrainz Server to v-2024-10-21.0
yvanzo Oct 21, 2024
3b7aa26
Upgrade MusicBrainz Server to v-2024-11-18.0
mwiencek Nov 18, 2024
3256f3b
Upgrade MusicBrainz Server to v-2024-09-12.0
reosarevok Dec 9, 2024
bd82ddc
Upgrade MusicBrainz Server to v-2025-01-13
reosarevok Jan 13, 2025
59b8940
Upgrade MusicBrainz Server to v-2025-01-27
reosarevok Jan 27, 2025
5c5e6ec
Amend 1f0218c3: Set variables for sir entrypoint
yvanzo Jan 28, 2025
f1d119c
Set default path to sir clone for development
yvanzo Jan 28, 2025
f44142f
Allow running any version of SIR via configuration
yvanzo Jan 28, 2025
e3ab935
Prefix all SIR dev setup variables with `SIR_DEV_`
yvanzo Jan 28, 2025
831bfe3
Warn about security issues with publishing ports
yvanzo Jan 29, 2025
73fe8d6
Fix omitting Sentry DSN in SIR config
yvanzo Jan 30, 2025
77897db
Merge pull request #292 from metabrainz/sir-dev-compose-env
yvanzo Jan 31, 2025
47b5c97
Upgrade MusicBrainz Server to v-2025-02-10.0
reosarevok Feb 10, 2025
b225dfb
Upgrade MusicBrainz Server to v-2025-02-24.0
reosarevok Feb 24, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# See https://docs.docker.com/compose/environment-variables/#the-env-file
/.env

# Bash history of musicbrainz container in development mode
/.musicbrainz-dev.bash_history.d/

# File created and managed by the script admin/create-amqp-extension
/admin/.create-amqp-extension.sql

Expand Down
72 changes: 64 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ search and replication in docker.

* CPU: 16 threads (or 2 without indexed search), x86-64 architecture
* RAM: 16 GB (or 4 without indexed search)
* Disk Space: 200 GB (or 100 without indexed search)
* Disk Space: 250 GB (or 100 without indexed search)

### Required software

Expand Down Expand Up @@ -87,9 +87,9 @@ If you use [UFW](https://help.ubuntu.com/community/UFW) to manage your firewall:

## Components version

* Current MB Branch: [v-2023-10-24-hotfix](build/musicbrainz/Dockerfile#L53)
* Current DB_SCHEMA_SEQUENCE: [28](build/musicbrainz/Dockerfile#L129)
* Postgres Version: [12](docker-compose.yml)
* Current MB Branch: [v-2025-02-24.0](build/musicbrainz/Dockerfile#L88)
* Current DB_SCHEMA_SEQUENCE: [29](build/musicbrainz/Dockerfile#L125)
* Postgres Version: [16](docker-compose.yml)
(can be changed by setting the environment variable `POSTGRES_VERSION`)
* MB Solr search server: [3.4.2](docker-compose.yml#L88)
(can be changed by setting the environment variable `MB_SOLR_VERSION`)
Expand Down Expand Up @@ -152,7 +152,7 @@ tables, the server will generally fall back to slower queries in their place.
If you wish to configure the materialized tables, you can run:

```bash
sudo docker-compose exec musicbrainz bash -c './admin/BuildMaterializedTables --database=MAINTENANCE all'
sudo docker-compose exec musicbrainz bash -c 'carton exec -- ./admin/BuildMaterializedTables --database=MAINTENANCE all'
```

### Start website
Expand Down Expand Up @@ -364,7 +364,7 @@ This number can be changed using the Docker environment variable
#### Customize download server

By default, data dumps and pre-built search indexes are downloaded from
`http://ftp.eu.metabrainz.org/pub/musicbrainz`.
`https://data.metabrainz.org/pub/musicbrainz`.

The download server can be changed using the Docker environment variable
`MUSICBRAINZ_BASE_DOWNLOAD_URL`.
Expand Down Expand Up @@ -401,6 +401,40 @@ This can be changed by creating a custom configuration file under
[and finally](https://docs.docker.com/storage/bind-mounts/#choose-the--v-or---mount-flag)
setting the Docker environment variable `SIR_CONFIG_PATH` to its path.

#### Customize backend Postgres server

By default, the services `indexer` and `musicbrainz` are trying to connect to the host `db` (for both read-only and write host) but the hosts can
be customized using the `MUSICBRAINZ_POSTGRES_SERVER` and `MUSICBRAINZ_POSTGRES_READONLY_SERVER` environment variables.

Notes:
* After switching to another Postgres server:
* If not transferring data, it is needed to create the database again.
* For live indexing, the RabbitMQ server has to still be reachable from the Postgres server.
* The helper scripts `check-search-indexes` and `create-amqp-extension` won’t work anymore.
* The service `db` will still be up even if unused.

#### Customize backend RabbitMQ server

By default, the services `db`, `indexer` and `musicbrainz` are trying to connect to the host `mq`
but the host can be customized using the `MUSICBRAINZ_RABBITMQ_SERVER` environment variable.

Notes:
* After switching to another RabbitMQ server:
- Live indexing requires to go through AMQP Setup again.
- If not transferring data, it might be needed to build search indexes again.
* The helper script `purge-message-queues` won’t work anymore.
* The service `mq` will still be up even if unused.

#### Customize backend Redis server

By default, the service `musicbrainz` is trying to connect to the host `redis`
but the host can be customized using the `MUSICBRAINZ_REDIS_SERVER` environment variable.

Notes:
* After switching to another Redis server:
- If not transferring data, MusicBrainz user sessions will be reset.
* The service `redis` will still be running even if unused.

### Docker Compose overrides

In Docker Compose, it is possible to override the base configuration using
Expand All @@ -421,6 +455,16 @@ Try `admin/configure help` for more information.

#### Publish ports of all services

:warning: The service `search` is currently running Solr 7 in
standalone mode which is vulnerable to privilege escalation.
See [CVE-2025-24814](https://lists.apache.org/thread/gl291pn8x9f9n52ys5l0pc0b6qtf0qw1) for details.
We are working on upgrading to Solr 9 in SolrCloud mode.
See [SEARCH-685](https://tickets.metabrainz.org/browse/SEARCH-685) for follow-up.
In general, Solr is strongly recommended to be accessible to your own clients only.
See [Solr Security](https://cwiki.apache.org/confluence/display/SOLR/SolrSecurity) for details.
Similarly, other services have not been configured to be safely publicly accessible either.
Take this warning in consideration when publishing their ports.

To publish ports of services `db`, `mq`, `redis` and `search`
(additionally to `musicbrainz`) on the host, simply run:

Expand Down Expand Up @@ -546,9 +590,21 @@ Simply restart the container when checking out a new branch.

This is very similar to the above but for Search Index Rebuilder (SIR):

1. Set the variable `SIR_LOCAL_ROOT` in the `.env` file
1. Optionally set the following variables in the `.env` file:
- `SIR_DEV_CONFIG_PATH`
(Default: `./default/config.ini` replacing `SIR_CONFIG_PATH`)
- `SIR_DEV_LOCAL_ROOT`
(Default: `../sir` assuming that `musicbrainz-docker` and `sir`
have been cloned under the same parent directory)
- `SIR_DEV_PYTHON_VERSION`
(Default: `2.7` matching `metabrainz/python` image tag)
- `SIR_DEV_BASE_IMAGE_DATE`
(Default: `20220421` matching `metabrainz/python` image tag)
- `SIR_DEV_VERSION`
(Default: `py27-stage1` which is informative only)
2. Run `admin/configure add sir-dev`
3. Run `sudo docker-compose up -d`
3. Run `sudo docker-compose build indexer`
4. Run `sudo docker-compose up -d`

Notes:

Expand Down
27 changes: 27 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Resolving name failed](#resolving-name-failed)
- [Loadable library and perl binaries are mismatched](#loadable-library-and-perl-binaries-are-mismatched)
- [ImportError: No module named](#importerror-no-module-named)
- [Unknown error executing apt-key](#unknown-error-executing-apt-key)

<!-- tocstop -->

Expand Down Expand Up @@ -109,3 +110,29 @@ sudo docker-compose restart indexer

Python packages are downloaded again and installed again when the
service `indexer` restarts.

## Unknown error executing apt-key

When building Docker image for the service `musicbrainz`:

``` log
Err:1 https://deb.nodesource.com/node_20.x nodistro InRelease
Unknown error executing apt-key
[...]
W: GPG error: https://deb.nodesource.com/node_20.x nodistro InRelease: Unknown error executing apt-key
E: The repository 'https://deb.nodesource.com/node_20.x nodistro InRelease' is not signed.
```

This may happen if your system is hindering file permissions.
You can find out by adding `RUN ls -l file` commands in the
Dockerfile.

Solution:

Configure your system to keep the file permissions defined in the Git repository
and to preserve the permissions of the files copied through Docker.

If it isn’t possible, for example with the Unraid operating system,
run additional `chmod` commands in the Dockerfile; See comments to the
issue [#263](https://github.com/metabrainz/musicbrainz-docker/pull/263).

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e
shopt -s extglob

PGDATA=/var/lib/postgresql/data
PGDATA_OLD="$PGDATA"/9.5
PGDATA_NEW="$PGDATA"/12
PGDATA_OLD="$PGDATA"/12
PGDATA_NEW="$PGDATA"/16
PGAMQP_DIR=/tmp/pg_amqp

function cleanup() {
Expand All @@ -15,8 +15,8 @@ function cleanup() {
fi

if [[ -d "$PGDATA_OLD" ]]; then
echo "Clean $PG_DATA_OLD off but 9.5 data"
rm -rf "$PGDATA"/!(9.5)
echo "Clean $PG_DATA_OLD off but 12 data"
rm -rf "$PGDATA"/!(12)
mv -v "$PGDATA_OLD"/* "$PGDATA"
rmdir "$PGDATA_OLD"
fi
Expand All @@ -28,35 +28,38 @@ function cleanup() {
}
trap cleanup EXIT

sudo -u postgres /usr/lib/postgresql/9.5/bin/pg_ctl stop -w -D "$PGDATA" \
sudo -u postgres /usr/lib/postgresql/12/bin/pg_ctl stop -w -D "$PGDATA" 2>/dev/null \
|| echo 'Assuming server is stopped...'

# We use the --link flag on pg_upgrade below to make hard links instead of
# copying files, drastically improving the speed of the upgrade. Hard links,
# of course, require the linked files to be on the same file system, but
# $PGDATA is the volume *root*. To work around that, we have to move the
# existing v9.5 cluster to a '9.5' subdir, and create the new v12 cluster in
# a '12' subdir. Once we're finished, we'll move the new cluster's files
# existing v12 cluster to a '12' subdir, and create the new v16 cluster in
# a '16' subdir. Once we're finished, we'll move the new cluster's files
# back into $PGDATA.
cd "$PGDATA"
sudo -u postgres mkdir -p 9.5 12
chmod 700 9.5 12
sudo -u postgres mv !(9.5|12) 9.5
sudo -u postgres mkdir -p 12 16
chmod 700 12 16
sudo -u postgres mv !(12|16) 12

sudo -u postgres /usr/lib/postgresql/12/bin/initdb \
sudo -u postgres /usr/lib/postgresql/16/bin/initdb \
--encoding utf8 \
--username musicbrainz \
"$PGDATA_NEW"

git clone -b "v0.4.1" --depth=1 https://github.com/omniti-labs/pg_amqp.git "$PGAMQP_DIR"
# There is no tag v0.4.2 (or 0.5.0) yet
PG_AMQP_GIT_REF="240d477d40c5e7a579b931c98eb29cef4edda164"
git clone https://github.com/omniti-labs/pg_amqp.git "$PGAMQP_DIR"
cd "$PGAMQP_DIR"
make PG_CONFIG=/usr/lib/postgresql/12/bin/pg_config
git checkout "$PG_AMQP_GIT_REF"
make PG_CONFIG=/usr/lib/postgresql/16/bin/pg_config PG_CPPFLAGS=-Wno-error=implicit-int
make install
cd "$PGDATA"

sudo -u postgres /usr/lib/postgresql/12/bin/pg_upgrade \
--old-bindir=/usr/lib/postgresql/9.5/bin/ \
--new-bindir=/usr/lib/postgresql/12/bin/ \
sudo -u postgres /usr/lib/postgresql/16/bin/pg_upgrade \
--old-bindir=/usr/lib/postgresql/12/bin/ \
--new-bindir=/usr/lib/postgresql/16/bin/ \
--old-datadir="$PGDATA_OLD" \
--new-datadir="$PGDATA_NEW" \
--jobs=3 \
Expand All @@ -72,9 +75,5 @@ mv "$PGDATA_NEW"/* "$PGDATA"/
rmdir "$PGDATA_NEW"
cp -a "$PGDATA_OLD"/{postgresql.conf,pg_hba.conf} .

# Start the new cluster in the background, so we can apply
# 20200518-pg12-after-upgrade.sql via the website container.
sudo -u postgres /usr/lib/postgresql/12/bin/pg_ctl start -w -D "$PGDATA"

./delete_old_cluster.sh
rm delete_old_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
db:
build:
args:
- POSTGRES_VERSION=9.5
image: musicbrainz-docker_db:9.5
- POSTGRES_VERSION=12
image: musicbrainz-docker_db:12
command: /bin/sleep infinity

musicbrainz:
Expand Down
104 changes: 104 additions & 0 deletions admin/repository/prebuild-db
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/usr/bin/env bash

set -e -u

# shellcheck source=admin/lib/common.inc.bash
source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.inc.bash"

HELP=$(cat <<EOH
Usage: $SCRIPT_NAME
or: $SCRIPT_NAME --help

Build a new image for the db service
from the source code repository of pg_amqp (AMQP Support for Postgres)
and push it as metabrainz/musicbrainz-docker-db:<tag>
where tag is based on Postgres major version and a build sequence number.

Prerequisites:

The version of Postgres must be up-to-date in:
README.md
build/postgres/Dockerfile
build/postgres-prebuilt/Dockerfile

The build sequence must be incremented, if image tag exists already
(for example when only files under build/postgres/ have changed), in:
build/postgres-prebuilt/Dockerfile
EOH
)

if [[ $# -ne 0 && $1 =~ -*h(elp)? ]]
then
echo "$HELP"
exit 0 # EX_OK
elif [[ $# -ne 0 ]]
then
echo >&2 "$SCRIPT_NAME: unrecognized argument: $1"
echo >&2 "Try '$SCRIPT_NAME help' for usage."
exit 64 # EX_USAGE
fi

# Retrieve destination image tag from the default Dockerfile

POSTGRES_VERSION=$(sed -n 's/^ARG POSTGRES_VERSION=\([^ ]*\).*$/\1/p' build/postgres-prebuilt/Dockerfile)
# shellcheck disable=SC2034 # as it used in eval below
DB_BUILD_SEQUENCE=$(sed -n 's/^ARG DB_BUILD_SEQUENCE=\([^ ]*\).*$/\1/p' build/postgres-prebuilt/Dockerfile)
DEST_IMAGE_TAG=$(eval echo "$(sed -n 's/^FROM \([^ ]*\).*$/\1/p' build/postgres-prebuilt/Dockerfile)")

# Check that the Postgres major version is the same in all other files

README_POSTGRES_VERSION=$(sed -n 's/^.*Postgres Version: \[\([^]]*\)\].*$/\1/p' README.md)

if [[ $POSTGRES_VERSION != "$README_POSTGRES_VERSION" ]]
then
echo >&2 "$SCRIPT_NAME: File differs in Postgres major version:"
echo >&2 "$SCRIPT_NAME: * build/postgres-prebuilt/Dockerfile: '$POSTGRES_VERSION'"
echo >&2 "$SCRIPT_NAME: * README.md: '$README_POSTGRES_VERSION'"
echo >&2 "Try '$SCRIPT_NAME help' for usage."
exit 65 # EX_DATAERR
fi

SOURCE_POSTGRES_VERSION=$(sed -n 's/^ARG POSTGRES_VERSION=\([^ ]*\).*$/\1/p' build/postgres/Dockerfile)

if [[ $POSTGRES_VERSION != "$SOURCE_POSTGRES_VERSION" ]]
then
echo >&2 "$SCRIPT_NAME: File differs in Postgres major version:"
echo >&2 "$SCRIPT_NAME: * build/postgres-prebuilt/Dockerfile: '$POSTGRES_VERSION'"
echo >&2 "$SCRIPT_NAME: * build/postgres/Dockerfile: '$SOURCE_POSTGRES_VERSION'"
echo >&2 "Try '$SCRIPT_NAME help' for usage."
exit 65 # EX_DATAERR
fi

# Check that the image tag doesn’t exist already

if $DOCKER_CMD image pull "$DEST_IMAGE_TAG" 2>/dev/null \
|| $DOCKER_CMD image ls "$DEST_IMAGE_TAG" 2>/dev/null | grep -Eq "$DEST_IMAGE_TAG"
then
echo >&2 "$SCRIPT_NAME: image tag exists already: $DEST_IMAGE_TAG"
echo >&2 "Try '$SCRIPT_NAME help' for usage."
exit 65 # EX_DATAERR
fi

# Do the thing

echo Building...

DOCKER_COMPOSE_OPTS='-f docker-compose.yml -f compose/db-own-build.yml'

# shellcheck disable=SC2086 # intentional word splitting of options
$DOCKER_COMPOSE_CMD $DOCKER_COMPOSE_OPTS build --progress=plain --pull db

echo Tagging...

# shellcheck disable=SC2086 # intentional word splitting of options
LOCAL_IMAGE_TAG=$($DOCKER_COMPOSE_CMD $DOCKER_COMPOSE_OPTS config --images | grep -o "musicbrainz-docker_db:$POSTGRES_VERSION$")

$DOCKER_CMD tag "$LOCAL_IMAGE_TAG" "$DEST_IMAGE_TAG"

echo Pushing...

$DOCKER_CMD push "$DEST_IMAGE_TAG"

echo Done.

# vi: set et sts=2 sw=2 ts=2 :
Loading