From 5f25c2acee04d1be74fda6ef9f165f2276a5a78f Mon Sep 17 00:00:00 2001 From: Pl217 Date: Mon, 27 Nov 2023 11:19:58 +0100 Subject: [PATCH 1/5] HPC-9088: Update docker compose files for Compose V2 --- CONTRIBUTING.md | 2 +- bin/sync-db.sh | 2 +- docker-compose.integrated.yml => compose.integrated.yaml | 0 docker-compose.yml => compose.yaml | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename docker-compose.integrated.yml => compose.integrated.yaml (100%) rename docker-compose.yml => compose.yaml (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6124bfaf..dc8b8350 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ This repository can be run as a standalone application or as part of [hpc-suite] ### Standalone To run this projects docker containers: -`docker-compose up -d` +`docker compose up -d` This will spin up the server and a postgres database. To restore data to this database see the [section below](#Restore_database). diff --git a/bin/sync-db.sh b/bin/sync-db.sh index e54bf885..d1032573 100755 --- a/bin/sync-db.sh +++ b/bin/sync-db.sh @@ -120,7 +120,7 @@ DROP SCHEMA public CASCADE; \ GRANT CREATE ON SCHEMA public to postgres;" $PG_DB_NAME # Because we are using Postgre container specified elsewhere, -# outside of docker-compose.yaml in this repo, we must manually +# outside of compose.yaml in this repo, we must manually # move the downloaded dumps into postgre container. # Ideally, local dumps directory should be mounted in PG container's `volumes` echo "Copy DB snapshot file to Postgre container" diff --git a/docker-compose.integrated.yml b/compose.integrated.yaml similarity index 100% rename from docker-compose.integrated.yml rename to compose.integrated.yaml diff --git a/docker-compose.yml b/compose.yaml similarity index 100% rename from docker-compose.yml rename to compose.yaml From 24b6669e83260f6cbc519d8405b6c27efb2085a5 Mon Sep 17 00:00:00 2001 From: Pl217 Date: Mon, 27 Nov 2023 11:24:17 +0100 Subject: [PATCH 2/5] HPC-9088: Remove version from compose files The top-level `version` property is defined by the Compose Specification for backward compatibility. It is only informative. https://docs.docker.com/compose/compose-file/04-version-and-name/ --- compose.integrated.yaml | 1 - compose.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/compose.integrated.yaml b/compose.integrated.yaml index f66111b3..9e75c575 100644 --- a/compose.integrated.yaml +++ b/compose.integrated.yaml @@ -1,4 +1,3 @@ -version: '3.3' services: api: container_name: hpc_api diff --git a/compose.yaml b/compose.yaml index 1c17f353..e8113b5c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,4 +1,3 @@ -version: '3.8' services: api: container_name: hpc_api From f28d2c6c341bf3d4a9cd25cac15a04b4cbaaa2bb Mon Sep 17 00:00:00 2001 From: Pl217 Date: Mon, 27 Nov 2023 11:27:37 +0100 Subject: [PATCH 3/5] HPC-9088: Use default container names Compose generates container names based on the project name, service name, and scale/replica count. In Compose V1, an underscore (_) was used as the word separator. In Compose V2, a hyphen (-) is used as the word separator. https://docs.docker.com/compose/migrate/#service-container-names Since existing container names aren't used anywhere else, just remove them and use default names --- compose.integrated.yaml | 1 - compose.yaml | 2 -- 2 files changed, 3 deletions(-) diff --git a/compose.integrated.yaml b/compose.integrated.yaml index 9e75c575..72b0c711 100644 --- a/compose.integrated.yaml +++ b/compose.integrated.yaml @@ -1,6 +1,5 @@ services: api: - container_name: hpc_api build: context: . dockerfile: ./env/api/Dockerfile diff --git a/compose.yaml b/compose.yaml index e8113b5c..ac833d5b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,5 @@ services: api: - container_name: hpc_api build: context: . dockerfile: ./env/api/Dockerfile @@ -26,7 +25,6 @@ services: - db db: image: postgres:11.7 - container_name: hpc_postgres_db environment: - POSTGRES_PASSWORD=demo - POSTGRES_USER=demo From 632e12a5f74ec20d70ec2a7caba203d7c807b9b2 Mon Sep 17 00:00:00 2001 From: Pl217 Date: Mon, 27 Nov 2023 11:30:01 +0100 Subject: [PATCH 4/5] Upgrade to Postgres 14 This API depends on v3 API to start the database, thus integrated compose file is used, instead of standalone compose file. Even though this file isn't usually used, update Postgres version, as this should have been done in HPC-8969 --- compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index ac833d5b..7a58fa81 100644 --- a/compose.yaml +++ b/compose.yaml @@ -24,7 +24,7 @@ services: depends_on: - db db: - image: postgres:11.7 + image: postgres:14.8-alpine3.18 environment: - POSTGRES_PASSWORD=demo - POSTGRES_USER=demo From e44793766582bd99faa8674cd182bde30005108f Mon Sep 17 00:00:00 2001 From: Delgee Date: Wed, 13 Dec 2023 14:35:49 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=96=20Bump=20version=20to=20`v4.6.?= =?UTF-8?q?1`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6fda1312..0a621858 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hpc-api", - "version": "4.6.0", + "version": "4.6.1", "description": "api for HPC applications", "main": "src/server.ts", "license": "MIT",