Skip to content

Commit 9cc8ff0

Browse files
committed
✨ Add deployment options for speed version and complete version. #702
1 parent e7d2106 commit 9cc8ff0

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

docker/deploy.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,16 @@ install() {
243243
return 1
244244
fi
245245

246-
if ! docker-compose -p nexent -f "docker-compose-supabase${COMPOSE_FILE_SUFFIX}" up -d; then
247-
echo "❌ ERROR Failed to start supabase services"
248-
ERROR_OCCURRED=1
249-
return 1
246+
# Only install docker-compose-supabase if DEPLOYMENT_VERSION is "full"
247+
if [ "$DEPLOYMENT_VERSION" = "full" ]; then
248+
echo "🎯 Full version detected - installing Supabase services..."
249+
if ! docker-compose -p nexent -f "docker-compose-supabase${COMPOSE_FILE_SUFFIX}" up -d; then
250+
echo "❌ ERROR Failed to start supabase services"
251+
ERROR_OCCURRED=1
252+
return 1
253+
fi
254+
else
255+
echo "⚡ Speed version detected - skipping Supabase services"
250256
fi
251257

252258
echo ""
@@ -473,7 +479,10 @@ generate_env_for_infrastructure() {
473479

474480
# Make sure the script is executable and run it
475481
chmod +x generate_env.sh
476-
./generate_env.sh
482+
483+
# Export DEPLOYMENT_VERSION to ensure generate_env.sh can access it
484+
export DEPLOYMENT_VERSION
485+
477486
if ./generate_env.sh; then
478487
echo "--------------------------------"
479488
echo ""

docker/generate_env.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,19 @@ main() {
305305
ERROR_OCCURRED=0 # Reset error flag for optional step
306306
}
307307

308-
add_jwt_to_env
308+
# Step 4: Generate JWT secrets only if DEPLOYMENT_VERSION is "full"
309+
if [ "$DEPLOYMENT_VERSION" = "full" ]; then
310+
echo "🎯 Full version detected - generating JWT secrets for Supabase..."
311+
add_jwt_to_env || { echo "❌ Failed to generate JWT secrets"; exit 1; }
312+
else
313+
echo "⚡ Speed version detected - skipping JWT secrets generation"
314+
fi
309315

310-
# Step 4: Update .env file
316+
# Step 5: Update .env file
311317
echo ""
312318
update_env_file || { echo "❌ Failed to update .env file"; exit 1; }
313319

314-
# Step 5: Show summary
320+
# Step 6: Show summary
315321
show_summary
316322
}
317323

0 commit comments

Comments
 (0)