-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstart.sh
More file actions
24 lines (17 loc) · 729 Bytes
/
start.sh
File metadata and controls
24 lines (17 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Ensure the environment variables are correctly set
echo "Creating admin with email: ${POCKETBASE_ADMIN_EMAIL}"
echo "PocketBase URL: ${POCKETBASE_URL}"
# Start PocketBase in the background
/pb/pocketbase serve --http=0.0.0.0:8080 --dir /app/db &
# Wait for PocketBase to start (adjust the sleep time if necessary)
sleep 5
# Create the admin user using environment variables
/pb/pocketbase admin create "${POCKETBASE_ADMIN_EMAIL}" "${POCKETBASE_ADMIN_PASSWORD}" --dir /app/db
sleep 2
# Build the SvelteKit app (requires PocketBase to be running)
npm run build
# # Optional: Log environment variables for debugging
# echo "PocketBase URL: ${POCKETBASE_URL}"
# echo "API Key: ${API_KEY}"
# echo "Title: ${TITLE}"