config: Update 5 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
This commit is contained in:
@@ -18,9 +18,31 @@ cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||
# Stop existing containers
|
||||
docker compose -p "${CONTAINER_NAME}" down 2>/dev/null || true
|
||||
|
||||
# Start containers (pull latest images if available)
|
||||
docker compose -p "${CONTAINER_NAME}" up -d --pull always || _die "Failed to start containers"
|
||||
# Start containers (only pull if image missing locally)
|
||||
docker compose -p "${CONTAINER_NAME}" up -d --pull missing || _die "Failed to start containers"
|
||||
|
||||
echo "Waiting for Seafile to initialize..."
|
||||
|
||||
# Wait for Seafile to be fully ready (check for seahub process)
|
||||
# shellcheck disable=SC2034
|
||||
for i in {1..60}; do
|
||||
if docker exec "${CONTAINER_NAME}" pgrep -f "seahub" &>/dev/null; then
|
||||
echo "Seafile is ready"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
|
||||
# Give it a moment to fully initialize
|
||||
sleep 5
|
||||
|
||||
# Always update admin credentials using Seafile's reset-admin script
|
||||
echo "Setting admin credentials..."
|
||||
docker exec "${CONTAINER_NAME}" bash -c "
|
||||
cd /opt/seafile/seafile-server-latest
|
||||
echo -e '${SEAFILE_ADMIN_EMAIL}\n${SEAFILE_ADMIN_PASSWORD}\n${SEAFILE_ADMIN_PASSWORD}' | ./reset-admin.sh
|
||||
" 2>&1
|
||||
|
||||
echo "Installation of ${CONTAINER_NAME} complete"
|
||||
echo "Access Seafile at ${SEAFILE_SERVER_PROTOCOL}://${SEAFILE_SERVER_HOSTNAME}:${HTTP_PORT}"
|
||||
echo "Note: First startup may take a few minutes while Seafile initializes the database."
|
||||
echo "Login with: ${SEAFILE_ADMIN_EMAIL}"
|
||||
|
||||
Reference in New Issue
Block a user