From 06585163d0e08c7291942a8fd827ab654581bc84 Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Fri, 17 Apr 2026 01:30:57 +0530 Subject: [PATCH] ci: improve compatibility for docker-compose execution --- frontend/vite.config.ts | 6 +++--- scripts/run-e2e.sh | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 421555a..4a51717 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -9,10 +9,10 @@ import { getBaseUrl } from "./utils/url-builder"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, "../", ""); const isSslEnabled = env.SSL_ENABLED === "true"; - let ssl_certs: { key: Buffer; cert: Buffer }; + let sslCerts: { key: Buffer; cert: Buffer } | undefined; if (isSslEnabled) { - ssl_certs = { + sslCerts = { key: fs.readFileSync( path.resolve(__dirname, "../certs/localhost-key.pem"), ), @@ -35,7 +35,7 @@ export default defineConfig(({ mode }) => { server: { port: Number(env.FRONTEND_PORT), host: env.FRONTEND_DOMAIN, - https: isSslEnabled ? ssl_certs : undefined, + https: isSslEnabled ? sslCerts : undefined, }, }; }); diff --git a/scripts/run-e2e.sh b/scripts/run-e2e.sh index d68823e..7cf8895 100755 --- a/scripts/run-e2e.sh +++ b/scripts/run-e2e.sh @@ -3,6 +3,7 @@ set -e # Use podman if available. Not everyone has it CONTAINER_BIN=$(command -v podman || command -v docker) +echo "Using $CONTAINER_BIN for container operations..." ENV_FILE="./.env.e2e" @@ -24,8 +25,12 @@ cleanup() { } trap cleanup EXIT -echo "Starting Database..." -$CONTAINER_BIN compose -f "./docker-compose.e2e.yml" up -d +echo "Starting Database and Mail server..." +if [ "$CONTAINER_BIN" = "podman" ]; then + podman compose -f "./docker-compose.e2e.yml" up -d +else + docker-compose -f "./docker-compose.e2e.yml" up -d +fi # postgress will take some time, so we wait, and no race condition. Also, no point in logging this output until $CONTAINER_BIN exec "$DB_NAME" pg_isready -U "${DB_USER:-test}" >/dev/null 2>&1; do