Skip to content

Commit fa48f28

Browse files
committed
feat: add entrypoint script to execute main.py with environment variable configuration
1 parent af47ff7 commit fa48f28

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

entrypoint.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Default values for environment variables
4+
PROJECT_ID="${PROJECT_ID}"
5+
INSTANCE_ID="${INSTANCE_ID}"
6+
DATABASE_ID="${DATABASE_ID}"
7+
MODE="${MODE:-noise}"
8+
DURATION="${DURATION:-60}"
9+
USERS="${USERS:-10000}"
10+
PRODUCTS="${PRODUCTS:-5000}"
11+
ORDERS="${ORDERS:-50000}"
12+
13+
# Execute the Python script with mapped arguments
14+
python3 main.py \
15+
--project "${PROJECT_ID}" \
16+
--instance "${INSTANCE_ID}" \
17+
--database "${DATABASE_ID}" \
18+
--mode "${MODE}" \
19+
--duration "${DURATION}" \
20+
--users "${USERS}" \
21+
--products "${PRODUCTS}" \
22+
--orders "${ORDERS}" \
23+
${ORDER_ID:+--order-id "$ORDER_ID"}

0 commit comments

Comments
 (0)