Skip to content

Commit 718629b

Browse files
Debugging container early exit.
1 parent d6c63a9 commit 718629b

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ services:
2626
- "4000:4000"
2727
depends_on:
2828
- db
29-
entrypoint: ["./docker-entrypoint.sh"]
29+
entrypoint:
30+
- /bin/sh
31+
- -c
32+
- |
33+
echo "==== ENVIRONMENT VARIABLES ===="
34+
env
35+
echo "==== REDIS_SERVERS ===="
36+
echo "$REDIS_SERVERS"
37+
./docker-entrypoint.sh
3038
networks:
3139
- codebuilder-net
3240

docker-entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# This script is the entrypoint for the Docker container.
44
# It ensures the database is ready before running migrations and starting the app.
55

6-
# Exit immediately if a command exits with a non-zero status.
7-
set -e
6+
7+
# Exit immediately if a command exits with a non-zero status and print each command before executing it (debugging)
8+
set -ex
89

910
# Enable color output
1011
export FORCE_COLOR=1

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
// and capture telemetry from the very beginning of the application's lifecycle.
99
//
1010
import { NodeSDK } from '@opentelemetry/sdk-node';
11+
12+
// DEBUG: Print REDIS_SERVERS and all env vars at startup
13+
console.log('DEBUG: REDIS_SERVERS env:', process.env.REDIS_SERVERS);
14+
console.log('DEBUG: All environment variables:', JSON.stringify(process.env, null, 2));
1115
//import openTelemetryConfig from './open-telemetry.config.json'; // Assuming this config file exists in your new project
1216

1317
// const openTelemetry = new NodeSDK(openTelemetryConfig);

0 commit comments

Comments
 (0)