From e1e6bd46c2a1960215712a1516abd3cea25e71e2 Mon Sep 17 00:00:00 2001 From: kseen Date: Tue, 10 Dec 2024 03:39:51 +0300 Subject: [PATCH 1/3] Remove commented out max connections argument from Docker Compose files --- docker-compose-build.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 6cc82e41..290f070a 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -23,7 +23,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - POSTGRES_INITDB_ARGS: "--max-connections=1500" + # POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d diff --git a/docker-compose.yml b/docker-compose.yml index 22040e2b..2d296488 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - POSTGRES_INITDB_ARGS: "--max-connections=1500" + # POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d From 031444d43721f13dd9bd9eb8ea48b4cc77d36d82 Mon Sep 17 00:00:00 2001 From: kseen Date: Tue, 10 Dec 2024 03:43:32 +0300 Subject: [PATCH 2/3] Increase wait time for containers to be ready and enable max connections in PostgreSQL configuration --- .github/workflows/on-commit-dev.yml | 2 +- .github/workflows/on-commit-main.yml | 2 +- docker-compose-build.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-commit-dev.yml b/.github/workflows/on-commit-dev.yml index 66908b28..0d9f3194 100644 --- a/.github/workflows/on-commit-dev.yml +++ b/.github/workflows/on-commit-dev.yml @@ -164,7 +164,7 @@ jobs: - name: Build and run containers run: | docker compose -f docker-compose-build.yml up -d - sleep 20 # Wait for containers to be ready + sleep 60 # Wait for containers to be ready - name: Run tests run: docker compose -f docker-compose-build.yml exec -T django pytest \ No newline at end of file diff --git a/.github/workflows/on-commit-main.yml b/.github/workflows/on-commit-main.yml index 33ac793e..e28b7ca0 100644 --- a/.github/workflows/on-commit-main.yml +++ b/.github/workflows/on-commit-main.yml @@ -163,7 +163,7 @@ jobs: - name: Build and run containers run: | docker compose -f docker-compose-build.yml up -d - sleep 20 # Wait for containers to be ready + sleep 60 # Wait for containers to be ready - name: Run tests run: docker compose -f docker-compose-build.yml exec -T django pytest diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 290f070a..6cc82e41 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -23,7 +23,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - # POSTGRES_INITDB_ARGS: "--max-connections=1500" + POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d diff --git a/docker-compose.yml b/docker-compose.yml index 2d296488..22040e2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - # POSTGRES_INITDB_ARGS: "--max-connections=1500" + POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d From ba974ad887fb8ce5fbefd0cc7c54c085c5f2261e Mon Sep 17 00:00:00 2001 From: kseen Date: Tue, 10 Dec 2024 03:50:10 +0300 Subject: [PATCH 3/3] Reduce wait time for containers to be ready in CI workflows and comment out max connections argument in Docker Compose files --- .github/workflows/on-commit-dev.yml | 2 +- .github/workflows/on-commit-main.yml | 2 +- docker-compose-build.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-commit-dev.yml b/.github/workflows/on-commit-dev.yml index 0d9f3194..66908b28 100644 --- a/.github/workflows/on-commit-dev.yml +++ b/.github/workflows/on-commit-dev.yml @@ -164,7 +164,7 @@ jobs: - name: Build and run containers run: | docker compose -f docker-compose-build.yml up -d - sleep 60 # Wait for containers to be ready + sleep 20 # Wait for containers to be ready - name: Run tests run: docker compose -f docker-compose-build.yml exec -T django pytest \ No newline at end of file diff --git a/.github/workflows/on-commit-main.yml b/.github/workflows/on-commit-main.yml index e28b7ca0..33ac793e 100644 --- a/.github/workflows/on-commit-main.yml +++ b/.github/workflows/on-commit-main.yml @@ -163,7 +163,7 @@ jobs: - name: Build and run containers run: | docker compose -f docker-compose-build.yml up -d - sleep 60 # Wait for containers to be ready + sleep 20 # Wait for containers to be ready - name: Run tests run: docker compose -f docker-compose-build.yml exec -T django pytest diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 6cc82e41..290f070a 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -23,7 +23,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - POSTGRES_INITDB_ARGS: "--max-connections=1500" + # POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d diff --git a/docker-compose.yml b/docker-compose.yml index 22040e2b..2d296488 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} PGDATA: "/var/lib/postgresql/data/pgdata" - POSTGRES_INITDB_ARGS: "--max-connections=1500" + # POSTGRES_INITDB_ARGS: "--max-connections=1500" POSTGRES_MAX_CONNECTIONS: "1500" volumes: - db-data:/docker-entrypoint-initdb.d